mirror of
https://github.com/php/php-src.git
synced 2024-10-16 05:52:36 +00:00
3c365dc3ef
1) Prepended starting the server with "exec" so proc_terminate can correctly close it (see also this note http://www.php.net/manual/en/function.proc-get-status.php#93382 for details) 2) Moved putting down the server to the shutdown function to make it independent from tests (fatal) errors 3) Moved php cli executable into the function to make tests more readable 4) changed sleep(1) to usleep(50000) (50 ms) to make tests faster - this needs more testing and if timeout is too small should be increased
22 lines
506 B
PHP
22 lines
506 B
PHP
--TEST--
|
|
Bug #55726 (Changing the working directory makes router script inaccessible)
|
|
--INI--
|
|
allow_url_fopen=1
|
|
--SKIPIF--
|
|
<?php
|
|
include "skipif.inc";
|
|
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
die ("skip not for Windows");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
include "php_cli_server.inc";
|
|
php_cli_server_start('chdir("/tmp"); echo "okey";');
|
|
var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS));
|
|
var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS));
|
|
?>
|
|
--EXPECTF--
|
|
string(4) "okey"
|
|
string(4) "okey"
|