Content not being compressed even though I'm using zlib in php.ini
Posted
by
Tola Odejayi
on Server Fault
See other posts from Server Fault
or by Tola Odejayi
Published on 2012-09-17T23:51:26Z
Indexed on
2012/09/20
15:40 UTC
Read the original article
Hit count: 288
compression
|php.ini
I've edited my php.ini file so that it has these two entries:
zlib.output_compression = On
zlib.output_compression_level = 4
However, after restarting apache, when I request php pages, the headers returned in the response indicate that my server is still NOT serving compressed pages (here are selected headers as viewed using Chrome's Network feature):
Cache-Control:no-cache, must-revalidate, max-age=0
Connection:Keep-Alive
Content-Type:text/html; charset=UTF-8
Date:Mon, 17 Sep 2012 23:46:13 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified:Mon, 17 Sep 2012 23:46:13 GMT
Pragma:no-cache
Proxy-Connection:Keep-Alive
Server:Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.17
Transfer-Encoding:chunked
Via:1.1 XXX-PRXY-07
X-Powered-By:PHP/5.2.17
What might I be doing wrong? Is there any other setting that I need to change?
EDIT
Here is another set of headers returned to another computer:
Cache-Control:no-cache, must-revalidate, max-age=0
Connection:close
Content-Type:text/html; charset=UTF-8
Date:Thu, 20 Sep 2012 09:45:26 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified:Thu, 20 Sep 2012 09:45:26 GMT
Pragma:no-cache
Server:Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.17
Transfer-Encoding:chunked
Vary:Cookie
X-Powered-By:PHP/5.2.17
© Server Fault or respective owner