PHP  
 PHP_5_4
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_011.phpt ('Bug #60180 ($_SERVER["PHP_SELF"] incorrect)')

Script

1: <?php
2:
include "php_cli_server.inc";
3:
php_cli_server_start('sytanx error;'TRUE);
4:
5: list(
$host$port) = explode(':'PHP_CLI_SERVER_ADDRESS);
6:
$port intval($port)?:80;
7:
8:
$fp fsockopen($host$port$errno$errstr0.5);
9: if (!
$fp) {
10:   die(
"connect failed");
11: }
12:
13:
$logo_id php_logo_guid();
14:
15: if(
fwrite($fp, <<<HEADER
16:
GET /?={$logo_id} HTTP/1.1
17: Host: 
{$host}
18:
19:
20:
HEADER
21: )) {
22:     while (!
feof($fp)) {
23:         if ((
"Content-Type: image/gif") ==  trim(fgets($fp))) {
24:             echo 
"okey";
25:             break;
26:         }
27:     }
28: }
29:
30:
fclose($fp);
31:
32:
?>
33:

Expected

okey

Output

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

Diff

001+ Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_4/sapi/cli/tests/php_cli_server_011.php on line 8
001- okey
002+ connect failed

 

Generated at Sat, 13 Sep 2014 16:24:41 +0000 (4 days ago)

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