mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Fixed bug #60523 (PHP Errors are not reported in browsers using built-in SAPI)
This commit is contained in:
parent
01dc47631e
commit
80ab69876c
5
NEWS
5
NEWS
@ -8,8 +8,11 @@ PHP NEWS
|
||||
- CLI SAPI:
|
||||
. Fixed bug #60477 (Segfault after two multipart/form-data POST requests,
|
||||
one 200 RQ and one 404). (Laruence)
|
||||
. Fixed bug #60523 (PHP Errors are not reported in browsers using built-in
|
||||
SAPI). (Laruence, Derick)
|
||||
- Pdo Firebird:
|
||||
. Fixed bug #48877 ("bindValue" and "bindParam" do not work for PDO Firebird).(Mariuz)
|
||||
. Fixed bug #48877 ("bindValue" and "bindParam" do not work for PDO Firebird).
|
||||
(Mariuz)
|
||||
|
||||
08 Dec 2011, PHP 5.4.0 RC3
|
||||
- Core:
|
||||
|
@ -1913,6 +1913,7 @@ static int php_cli_server_request_startup(php_cli_server *server, php_cli_server
|
||||
destroy_request_info(&SG(request_info));
|
||||
return FAILURE;
|
||||
}
|
||||
PG(during_request_startup) = 0;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
49
sapi/cli/tests/php_cli_server_015.phpt
Normal file
49
sapi/cli/tests/php_cli_server_015.phpt
Normal file
@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
Bug #60523 (PHP Errors are not reported in browsers using built-in SAPI)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
?>
|
||||
--INI--
|
||||
display_errors=1
|
||||
--FILE--
|
||||
<?php
|
||||
include "php_cli_server.inc";
|
||||
php_cli_server_start('require("syntax_error.php");');
|
||||
$dir = realpath(dirname(__FILE__));
|
||||
|
||||
file_put_contents($dir . "/syntax_error.php", "<?php non_exists_function(); ?>");
|
||||
|
||||
list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
|
||||
$port = intval($port)?:80;
|
||||
$output = '';
|
||||
|
||||
$fp = fsockopen($host, $port, $errno, $errstr, 0.5);
|
||||
if (!$fp) {
|
||||
die("connect failed");
|
||||
}
|
||||
|
||||
if(fwrite($fp, <<<HEADER
|
||||
GET /index.php HTTP/1.1
|
||||
Host: {$host}
|
||||
|
||||
|
||||
HEADER
|
||||
)) {
|
||||
while (!feof($fp)) {
|
||||
$output .= fgets($fp);
|
||||
}
|
||||
}
|
||||
echo $output;
|
||||
@unlink($dir . "/syntax_error.php");
|
||||
fclose($fp);
|
||||
?>
|
||||
--EXPECTF--
|
||||
HTTP/1.1 200 OK
|
||||
Host: %s
|
||||
Connection: closed
|
||||
X-Powered-By: PHP/%s
|
||||
Content-type: text/html
|
||||
|
||||
<br />
|
||||
<b>Fatal error</b>: Call to undefined function non_exists_function() in <b>%ssyntax_error.php</b> on line <b>%s</b><br />
|
Loading…
Reference in New Issue
Block a user