ID: 35936 Updated by: [EMAIL PROTECTED] Reported By: sBoisvert at bryxal dot ca Status: Open -Bug Type: Zlib Related +Bug Type: Documentation problem Operating System: XP PHP Version: 5.1.1 New Comment:
>From reading the sources (always the best reference..): 156 php_error(E_WARNING, "Cannot change zlib.output_compression buffer size during script execution"); 157 return FAILURE; Vrana: Please, don't reclassify documentation issues before discussing on internals where lot more people than just me can see them.. Previous Comments: ------------------------------------------------------------------------ [2007-08-20 12:36:32] [EMAIL PROTECTED] Is there a reason to not be able to *enable* the output compression from runtime? ------------------------------------------------------------------------ [2006-05-24 11:48:54] [EMAIL PROTECTED] IIRC (and reading the code reveals that) it's possible to *disable* zlib.output_compression at runtime, which actually works fine here. ------------------------------------------------------------------------ [2006-04-15 21:29:36] [EMAIL PROTECTED] Looks like the docs are wrong and this option is actually not PHP_INI_ALL, but PHP_INI_SYSTEM|PHP_INI_PERDIR. This was accidentally changed with this patch: http://cvs.php.net/viewcvs.cgi/php-src/ext/zlib/zlib.c?r1=1.136&r2=1.137 ------------------------------------------------------------------------ [2006-01-09 15:00:46] [EMAIL PROTECTED] php_enable_output_compression() is called only in PHP_RINIT_FUNCTION() and not in OnUpdate_zlib_output_compression(). ------------------------------------------------------------------------ [2006-01-09 01:17:56] sBoisvert at bryxal dot ca Description: ------------ This has either not been fixed or crept back in. (Bug #17299) The documentation on http://ca3.php.net/manual/en/ref.zlib.php#ini.zlib.output-compression it states zlib.output_compression boolean/integer .... In runtime, it can be set only before sending any output. but any attempts to set ini_set("zlib.output_compression", "on"); ini_set("zlib.output_compression_level", 5); will NOT compress data before sending it. Either this is a bug that slipped in lately or a documentation problem. A comment has already been left by someone on this page commenting on his inability to make this work. Thank you Reproduce code: --------------- ini_set("zlib.output_compression", "on"); ini_set("zlib.output_compression_level", 5); echo(ini_get("zlib.output_compression")); Expected result: ---------------- compressed: on Actual result: -------------- uncompressed: on ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35936&edit=1