#17603 [Opn->Csd]: ini_set can't disable zlib

From: Date: Sun, 23 Mar 2003 00:48:46 +0000
Subject: #17603 [Opn->Csd]: ini_set can't disable zlib
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36201@lists.php.net to get a copy of this message
ID: 17603 Updated by: sniper@php.net Reported By: anon-php at sitefoundry dot com -Status: Open +Status: Closed Bug Type: Zlib Related Operating System: all PHP Version: 4.3.2 New Comment: Docs and sources are fine now. Previous Comments: ------------------------------------------------------------------------ [2003-03-22 14:59:09] philip@php.net The ini table is now autogenerated off PHP source so any changed text in the docs has been written over. Snipped from the source (/ext/zlib/zlib.c): STD_PHP_INI_BOOLEAN("zlib.output_compression", "0", PHP_INI_ALL.. STD_PHP_INI_ENTRY("zlib.output_compression_level","-1", PHP_INI_ALL.. STD_PHP_INI_ENTRY("zlib.output_handler", "", PHP_INI_ALL.. Either the source needs to be changed OR someone explains how this should be documented. Reopening as a zlib related problem. ------------------------------------------------------------------------ [2003-03-22 14:21:50] phpuser at dpiworld dot com The current online documentation still (incorrectly) lists: zlib.output_compression as "PHP_INI_ALL" on page: http://www.php.net/manual/en/ref.zlib.php ------------------------------------------------------------------------ [2002-06-18 06:17:27] cortesi@php.net This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. changed value from "PHP_INI_ALL" to "PHP_INI_SYSTEM|PHP_INI_PERDIR" for "zlib.output_compression" ------------------------------------------------------------------------ [2002-06-05 10:07:53] anon-php at sitefoundry dot com Thanks for the suggestion. I regret to report that I can't make it work: no number of calls to flush(), ob_end_clean(), or ob_implicit_flush() allow the script to output non-compressed data. So, this comment: "If you disable it in your script after it has been started it won't be stopped." actually seems to mean "It is not possible to disable zlib output compression or buffering within a script." IMO this would be useful to note on the manual page for ini_set(). ------------------------------------------------------------------------ [2002-06-05 06:21:20] sander@php.net This is quite logical because the output compression starts before your script is executed. If you disable it in your script after it has been started it won't be stopped. You can _try_ a couple of ob_end_clean()'s (use ob_get_level() to find out how many) to stop it. Reopening as a documentation problem. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17603 -- Edit this bug report at http://bugs.php.net/?id=17603&edit=1

« previous php.bugs (#36201) next »