|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2012-01-15 12:37 UTC] valentiny510 at yahoo dot es
 Description: ------------ Trying to compress the output with zlib.output_compression = On zlib.output_compression_level = 9 it seems its working only the first time when the page is accessed. When I refresh the page it restores the original size. If I restart the Apache server, the firebug shows the compressed size only the first time, but if you refresh the page the size change to original again. One little test was made with phpinfo( ), and tested 100 times.. Test script: --------------- <?php phpinfo( ); ?> Expected result: ---------------- The size of the page 10,6 KB (10.852 bytes) (every time) Actual result: -------------- The size of the page 10,6 KB (10.852 bytes) (only first time) The size of the page 66,75 KB (68.353 bytes) (after refresh) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
I just tested this with 5.4.4RC1. While output compression is now on for more than just one request, there is another drawback: I have several pools defined via fpm. One of them has "php_flag[zlib.output_compression] = on". Once the vhost using this pool is accessed output compression is turned on for all fpm pool and cannot be turned off. Even worse: ini_get('zlib.output_compression') still reports false. If you then use the ob_gzhandler you get "output handler 'ob_gzhandler' conflicts with 'zlib output compression'"