PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for sapi/cli/tests/php_cli_server_017.phpt ('Implement Req #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)')

Script

1: <?php
2:
include "php_cli_server.inc";
3:
php_cli_server_start(<<<'PHP'
4:
var_dump($_SERVER['SCRIPT_FILENAME']);
5:
PHP
6: );
7:
8: list(
$host$port) = explode(':'PHP_CLI_SERVER_ADDRESS);
9:
$port intval($port)?:80;
10:
11:
$fp fsockopen($host$port$errno$errstr0.5);
12: if (!
$fp) {
13:   die(
"connect failed");
14: }
15:
16: if(
fwrite($fp, <<<HEADER
17:
POST / HTTP/1.1
18: Host: 
{$host}
19:
20:
21:
HEADER
22: )) {
23:     while (!
feof($fp)) {
24:         echo 
fgets($fp);
25:     }
26: }
27:
28:
fclose($fp);
29:
?>
30:

Expected

HTTP/1.1 200 OK
Host: %s
Connection: close
X-Powered-By: %s
Content-type: text/html; charset=UTF-8

string(%d) "%sindex.php"

Output

Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_HEAD/sapi/cli/tests/php_cli_server_017.php on line 11
connect failed

Diff

001+ Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_HEAD/sapi/cli/tests/php_cli_server_017.php on line 11
002+ connect failed
001- HTTP/1.1 200 OK
002- Host: %s
003- Connection: close
004- X-Powered-By: %s
005- Content-type: text/html; charset=UTF-8
006- 
007- string(%d) "%sindex.php"

 

Generated at Tue, 14 Oct 2014 07:25:56 +0000 (6 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.