From: radamantis at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.2.4
PHP Bug Type: Output Control
Bug description: ob_gzhandler broken.
Description:
------------
Apache2 module.
PHP-recommended.ini / default
output_handler =
zlib.output_compression = Off
ob_start('ob_gzhandler') doesn't work as expected. The same if wrapped
into a function.
Reproduce code:
---------------
#1
ob_start('ob_gzhandler');
echo "Something";
ob_end_flush();
echo "Hello World";
// Call undefined function
call_some_user_function();
#2
function compress_data($output)
{
return ob_gzhandler($output);
}
ob_start('compress_data');
echo "Something<br/>";
ob_end_flush();
echo "Hello World";
// Call undefined function.
call_some_user_function();
Expected result:
----------------
#1
Something
Hello World
Fatal error: Call to undefined function call_some_user_function() in
some_file.php........
#2
Something
Hello World
Fatal error: Call to undefined function call_some_user_function() in
some_file.php........
Actual result:
--------------
#1
Something
Nothing happens, no fatal error at all, in fact, looks like there's no
more processing from that point on.
#2
Hello World
Fatal error: Call to undefined function call_some_user_function() in
some_file.php........
Where's the buffer?
--
Edit bug report at http://bugs.php.net/?id=43088&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43088&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43088&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43088&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43088&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43088&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43088&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43088&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43088&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43088&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43088&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43088&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43088&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43088&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43088&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43088&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43088&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43088&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43088&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43088&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43088&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43088&r=mysqlcfg