|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21944 zlib compressed pages can be flushed causing compressed output to be displayed
Submitted: 2003-01-29 09:50 UTC Modified: 2003-08-09 14:46 UTC
Avg. Score:3.3 ± 1.7
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: phpbug at paragontech dot com Assigned:
Status: Closed Package: Zlib related
PHP Version: 4.3.3RC2-dev OS: all
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 !
Your email address:
Solve the problem:
50 - 44 = ?
Subscribe to this entry?

 [2003-01-29 09:50 UTC] phpbug at paragontech dot com
This is with apache2 2.0.44 on Win NT

If zlib.output_compression = On in the php.ini, and a flush() statement is sent on a PHP page, the compressed output will be displayed in the browser, or the user will be asked to "download" the file.  If you do download this file, all you would see is the compressed output.

I've never seen this behavior in previous versions of PHP, it's quite possible that this behavior is by design (it does exactly what you tell it to, it flushes its output, but the results are unexpected.)  Removing the flush() statements or setting zlib.output_compression = Off are possible solutions until a fix (if any) is made.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-29 10:48 UTC] phpbug at paragontech dot com
This is a problem with IE 6.0.26 as well as Netscape Navigator 4.08.
 [2003-01-30 03:18 UTC]
I noticed this issue before the release of 4.3.0.
A kind of Apache2 oddity. Should be fixed.

 [2003-05-14 21:59 UTC]
This problem also occurs on our own site with latest stable CVS.
 [2003-06-01 06:54 UTC] dennis at darknoise dot de
it also happens to me with a 1.3.x apache and php versions from 4.3.x on RedHat Linux 7.3
 [2003-07-24 03:52 UTC] gja822 at ironbytes dot com
I've something similiar with that.
But the bug occures on PHP4.3.3RC2-dev with 
ZLib 1.1.3 compiled and 1.1.4 linked.
    system("zip ...1 ...2");
caused gziped output, instead smth like that:
May be that's becouse of system()???(other bugs not noticed until zlib.output_commpression set to 'Off')
 [2003-08-09 14:46 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Oct 05 03:01:24 2023 UTC