|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40055 ob_gzhandler do not work correctly for register_shutdown_function
Submitted: 2007-01-08 02:00 UTC Modified: 2007-01-11 10:06 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hightman at twomice dot net Assigned:
Status: Wont fix Package: Output Control
PHP Version: 4.4.4 OS: Linux/FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
8 + 40 = ?
Subscribe to this entry?

 [2007-01-08 02:00 UTC] hightman at twomice dot net
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:
function foo()
  echo "Hello, foo bar before process quit!\n";

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-11 10:06 UTC]
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.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jul 27 14:01:25 2021 UTC