Edit report at https://bugs.php.net/bug.php?id=64152&edit=1
ID: 64152
User updated by: mmicael at gmail dot com
Reported by: mmicael at gmail dot com
Summary: php return wrong string with HEAD Request Method
Status: Open
Type: Bug
Package: Output Control
-Operating System: Any
+Operating System: linux
PHP Version: 5.4.11
Block user comment: N
Private report: N
New Comment:
Modifiying OS
Previous Comments:
------------------------------------------------------------------------
[2013-02-05 10:51:49] mmicael at gmail dot com
Description:
------------
When we do a HEAD Request Method in php 5.4, php continue executing script even
if the output buffer exceed the max output_buffering.
the next ob_start, ob_get_contents always return empty string
In php 5.2 and 5.3, the script die after sending the first output buffer that
reach the max output_buffering.
Test script:
---------------
$string = '';
for($i=0;$i<5000;$i++) $string .= '0';
ob_start();
echo "test1";
$content = ob_get_contents();
ob_end_clean();
error_log("1-$content");
echo $string;
ob_start();
echo "test2";
$content .= ob_get_contents();
ob_end_clean();
echo $string;
error_log("2-$content");
Expected result:
----------------
In php 5.2 and 5.3
1-test1
Actual result:
--------------
In php 5.4
1-test1
2-test1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64152&edit=1