php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61434 zlib.output_compression not normal work in IIS7.5
Submitted: 2012-03-19 10:31 UTC Modified: 2012-03-28 15:56 UTC
From: info at ongod dot org Assigned:
Status: Not a bug Package: Zlib related
PHP Version: 5.4.0 OS: windows2008R2x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: info at ongod dot org
New email:
PHP Version: OS:

 

 [2012-03-19 10:31 UTC] info at ongod dot org
Description:
------------
I am running php5.4 in IIS7.5 when I config zlib.output_compression= on and 
zlib.output_compression_level = -1 in php.ini, it can't compression out. 

I am use the tools for check site.

http://www.gidnetwork.com/tools/gzip-test.php
http://tool.chinaz.com/gzips/


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-19 10:39 UTC] mike@php.net
Is you're site publicly viewable?

Check if you do not call ini_set("zlib.output_compression", false) in your code.
 [2012-03-19 10:39 UTC] mike@php.net
-Status: Open +Status: Feedback -Package: Zip Related +Package: Zlib related -Assigned To: +Assigned To: mike
 [2012-03-19 10:47 UTC] info at ongod dot org
-Status: Feedback +Status: Assigned
 [2012-03-19 10:47 UTC] info at ongod dot org
I am using wordpress 3.3.1 code.

run site is http://www.xiaoyu.net  and http://www.yessan.org/

How I check in wordpress code?
 [2012-03-19 10:57 UTC] mike@php.net
-Status: Assigned +Status: Feedback
 [2012-03-19 10:57 UTC] mike@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Sorry, I cannot assist you searching the code.
 [2012-03-19 11:15 UTC] info at ongod dot org
-Status: Feedback +Status: Assigned
 [2012-03-19 11:15 UTC] info at ongod dot org
I have try check it. try chang back use php5.3.10 normal for 
zlib.output_compression. but the php5.4 not normal work in the same site.

now I chage www.xiaoyu.net in php5.3.10. and http://www.yessan.org/ site use 
php5.4. all site run wordpress code.

So I think php5.4 should some bug in iis7.5.
 [2012-03-19 11:22 UTC] info at ongod dot org
-Status: Assigned +Status: Open
 [2012-03-19 11:22 UTC] info at ongod dot org
if you will, I can offer server account give you for check.
 [2012-03-19 11:25 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2012-03-19 11:25 UTC] mike@php.net
zlib.output_compression can be disabled at runtime at later stage in PHP 5.4.

I'd probably be lost on a Windows box, so I don't think I could help you there.
 [2012-03-19 11:40 UTC] info at ongod dot org
-Status: Feedback +Status: Assigned
 [2012-03-19 11:40 UTC] info at ongod dot org
Security reasons, I would also send an email to you.
 [2012-03-19 14:01 UTC] nacin at wordpress dot org
I can confirm that WordPress 3.3.1 does not set zlib.output_compression. Looks 
like WP never has.
 [2012-03-19 14:10 UTC] ab@php.net
I cannot reproduce the issue, tried with the latest php 5.4 and IIS7. IIS7 has 
compression turned off and the php.ini has both zlib.output_compression=on and 
zlib.output_compression_level=-1 set. The page is merely a phpinfo() page. Here 
the simple ping pong:

GET /i.php HTTP/1.1
Host: localhost
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) 
Chrome/17.0.963.79 Safari/535.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP/1.1 200 OK
Content-Type: text/html
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.4.1RC1-dev
Date: Mon, 19 Mar 2012 14:00:09 GMT
Content-Length: 6182

The output compression seems to work. 

@info at ongod dot org

Could you please try such a simple page scenario and post the request/response 
headers?
 [2012-03-19 14:14 UTC] pajoye@php.net
-Status: Assigned +Status: Not a bug -Assigned To: mike +Assigned To:
 [2012-03-19 14:14 UTC] pajoye@php.net
ok, not a bug but a support issue.

@info at ongod dot org

Please ask further support on the PHP general mailing list or any other support 
channel, thanks!
 [2012-03-19 17:07 UTC] info at ongod dot org
it is Should be clean code for check. php5.4 not normal work.  but php5.3.10 
normal work in the same server.  who tell me why this ?

http://www.ongod.org/test/phpinfo.php

Web page compressed?	No
Compression type?	none
Size, Markup (bytes)	83,611
Size, Compressed (bytes)	0
Compression %	0.0

php5.3.10
http://mail.ipv6china.com/phpinfo.php

Web page compressed?	Yes
Compression type?	gzip
Size, Markup (bytes)	87,124
Size, Compressed (bytes)	13,730
Compression %	84.2

check from http://www.gidnetwork.com/tools/gzip-test.php
 [2012-03-20 12:56 UTC] ab@php.net
As you can see, my tests was indeed with IIS7.5 as well, but PHP 5.4 from the 
trunk. The things happening on your server look like a configuration issue.

What you could do
* try another IIS instance, may be on your localhost
* try 5.4 trunk as well
* check that IIS doesn't drop any headers
* ask for help in the mailing lists
 [2012-03-20 13:36 UTC] ab@php.net
btw just downloaded php-5.4.0-nts-Win32-VC9-x86 and tried it:

GET /i.php HTTP/1.1
Host: localhost
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) 
Chrome/17.0.963.79 Safari/535.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP/1.1 200 OK
Content-Type: text/html
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.4.0
Date: Tue, 20 Mar 2012 13:26:04 GMT
Content-Length: 9826

The output compression seems to be ok there as well.
 [2012-03-28 15:56 UTC] info at ongod dot org
Because php5.4 compression not normal work. So I have to enable IIS7.5 system 
compression. 

ok. now please check the www.ongod.org/test/phpinfo.php site. just now I have 
close IIS compression.

PHP5.4 sure can't work with zlib.output_compression.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 08:01:29 2025 UTC