Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zlib.output_compression off - How to test whether PHP compression is really disabled?

I added

php_flag zlib.output_compression off

to my .htaccess. I read PHP compression needs to be disabled if I want to get mod_deflate working.

Is there any way to test whether PHP compression is really disabled?

like image 999
dash Avatar asked Oct 31 '22 11:10

dash


1 Answers

If you're concerned PHP isn't picking up the right value from your php.ini, you can use ini_get to check it.

If your concern is that PHP is just compressing regardless you can just make an HTTP request by hand (using netcat, telnet, etc.) or snoop on your a request for your browser using the developer tools. Just make sure request headers include Accept-encoding: gzip, deflate and check the Content-encoding response header. However, keep in mind that there could be other offenders here (like mod_deflate, your PHP script, a proxy…).

like image 139
nemequ Avatar answered Nov 08 '22 08:11

nemequ