Re: zlib.output_compression
| From: | LacaK | Date: | Wed, 13 Jul 2005 08:49:47 +0000 |
| Subject: | Re: zlib.output_compression | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218602@lists.php.net to get a copy of this message | ||
Yes, I tried setting it to 1 and also "on" and 4096 /*buffer size*/, but the same result.
phpinfo() says, that zlib.output_compression=on, but page is not compressed.
I have checked source code of php, but I am not able to find, why it does not work ?
Can any one explain, why is possible set zlib.output_compression from On /*in php.ini*/ to Off /*using ini_set()*/, but not from Off to On ?
Thanks
LacaK.
Mikey wrote:
LacaK wrote:Thanks for reply, In documentation is stated, than "zlib.output_compression" is changeable at PHP_INI_ALL. If there is no possibility to change it in script, why it is not PHP_INI_SYSTEM|PHP_INI_PERDIR ? And at second : When I set "zlib.output_compression=on" in php.ini, then I CAN turn it off in script using ini_set('zlib.output_compression', false); /*this works !*/ Why does not work ini_set('zlib.output_compression', true); ? /*this is a first line in script, so no output is already send*/ BUG No. is 33653 http://bugs.php.net/bug.php?id=33653 , but sniper@php.net market is as Bogus I still think, that it does not work as expected. LacaK. Jasper Bryant-Greene wrote:Just my 2 cents worth but have you tried setting it to 1 rather than true? I know that that is the format you need to use in .htaccess files, maybe it is the same for ini_set? HTH, MikeyLacaK wrote:Yes, my browser send "Accept-Encoding: gzip,deflate" When I alter : "zlib.output_compression=on" in php.ini it works fine ! Only runtime alter : ini_set('zlib.output_compression', true); does not work !? LacaK.I'm pretty sure this behaviour is by design -- it doesn't make sense to allow setting it at runtime as some output could already have been made. Be interesting to see what the bug report digs up, though -- can we have a link? Jasper