ID: 40055
Updated by: [EMAIL PROTECTED]
Reported By: hightman at twomice dot net
-Status: Open
+Status: Wont fix
Bug Type: Output Control
Operating System: Linux/FreeBSD
PHP Version: 4.4.4
New Comment:
In PHP4 shutdown functions are called after flushing the output
buffers, but in PHP5 this behaviour is different.
We do not plan to introduce any changes in PHP4 except for critical
bugfixes.
Previous Comments:
------------------------------------------------------------------------
[2007-01-08 02:00:34] hightman at twomice dot net
Description:
------------
If there are some outputs on the functions called by
`register_shutdown_function`, the `ob_gzhandler` do not work correctly
for these outputs messages. In other words, these messages have not
been compressed with the other outpus msg.
It is serious problem for the Web Browsers, because they will get the
error check sum of contents, so the page content can't not be display
fullly.
Reproduce code:
---------------
<?php
function foo()
{
echo "Hello, foo bar before process quit!\n";
}
ob_start('ob_gzhandler');
register_shutdown_function('foo');
echo "Normal output\n";
?>
Expected result:
----------------
The output of function `foo` will be added to all output msg and
compressed by ob_gzhandler
Actual result:
--------------
"Normal output\n" were compressed, and the ouput of `foo()` never been
compressed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40055&edit=1