php.net |  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
Votes:3
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
 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] moriyoshi@php.net
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] wez@php.net
This problem also occurs on our own gtk.php.net 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.
Using 
    system("zip ...1 ...2");
caused gziped output, instead smth like that:
    adding....xxx
    adding....yyy
May be that's becouse of system()???(other bugs not noticed until zlib.output_commpression set to 'Off')
 [2003-08-09 14:46 UTC] iliaa@php.net
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 http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC