|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30507 Content-Encoding header is not set
Submitted: 2004-10-21 02:44 UTC Modified: 2005-03-15 01:00 UTC
Avg. Score:4.4 ± 0.7
Reproduced:9 of 9 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (11.1%)
From: webmaster at ex-centris dot com Assigned:
Status: No Feedback Package: Zlib related
PHP Version: 5.0.2 OS: RedHat Enterprise Linux 3
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:
44 - 15 = ?
Subscribe to this entry?

 [2004-10-21 02:44 UTC] webmaster at ex-centris dot com
I enabled automatic gzip compression with the following 
line in php.ini:

   zlib.output_compression = on

The problem is that the Content-Encoding header does not 
get set at all in the response. Therefore, a browser 
that advertises itself as supporting gzip compression 
(Accept-Encoding: gzip,deflate) receives compressed 
content but does not know it is compressed.

If I manually add the following to my script:

   header("Content-Encoding: gzip");

... it then works.

This was tried in the Safari and Firefox clients on Mac 
OS X. Server is RedHat Enterprise Linux 3 running kernel 
2.4.21-20. PHP 5.0.2 running as a module of 
Apache2 2.0.46.

If you need other details do not hesitate to contact me. 
Thank you.

P.S. Even though I compiled PHP with:

  ./configure --with-apxs2 --with-mysql --with-zlib

if I call phpinfo, here what it shows:

   ./configure --with-apxs2 --with-mysql

Reproduce code:

	print 'Here is some output !!!';


Expected result:
Here is some output !!!

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-07 22:22 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-10-09 05:48 UTC] altuhovd at gmail dot com
FreeBSD 6.2-RELEASE-p2
Apache/1.3.37 (Unix) 

header is not set!
Only working after manual header set!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 23:01:29 2024 UTC