#40055 [NEW]: ob_gzhandler do not work correctly for register_shutdown_function
| From: | hightman at twomice dot net | Date: | Mon, 08 Jan 2007 02:00:35 +0000 |
| Subject: | #40055 [NEW]: ob_gzhandler do not work correctly for register_shutdown_function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-107304@lists.php.net to get a copy of this message | ||
From: hightman at twomice dot net
Operating system: Linux/FreeBSD
PHP version: 4.4.4
PHP Bug Type: Output Control
Bug description: ob_gzhandler do not work correctly for register_shutdown_function
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 bug report at http://bugs.php.net/?id=40055&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40055&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40055&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40055&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40055&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40055&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40055&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40055&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40055&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40055&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40055&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40055&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40055&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40055&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40055&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40055&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40055&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40055&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40055&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40055&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40055&r=mysqlcfg