cvs: php4 / php.ini-dist php.ini-recommended /ext/zlib zlib.c

From: Date: Sun, 11 Aug 2002 02:32:50 +0000
Subject: cvs: php4 / php.ini-dist php.ini-recommended /ext/zlib zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13256@lists.php.net to get a copy of this message
yohgaki Sat Aug 10 22:32:50 2002 EDT Modified files: /php4 php.ini-dist php.ini-recommended /php4/ext/zlib zlib.c Log: Changed my mind. Let users decided whether users want larger chunk size or not. @ Changed zlib.output_compression behavior. If larger chunk is preferred, enable output_buffering also. (Marcus, Yasuo) Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.141 php4/php.ini-dist:1.142 --- php4/php.ini-dist:1.141 Fri Aug 9 18:29:57 2002 +++ php4/php.ini-dist Sat Aug 10 22:32:49 2002 @@ -92,21 +92,23 @@ ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the specified encoding. ; Setting any output handler automatically turns on output buffering. -; NOTE: People who wrote portable scripts should not depend on this ini -; directive. Instead, explicitly set the output handler using ob_start(). -; Using this ini directive may cause problems unless you know what script -: is doing. -; NOTE: You cannot use both "mb_output_handler" with "ob_inconv_handler" -; and you cannot use both "ob_gzhandler" and "zlib.output_compression". +; Note: People who wrote portable scripts should not depend on this ini +; directive. Instead, explicitly set the output handler using ob_start(). +; Using this ini directive may cause problems unless you know what script +: is doing. +; Note: You cannot use both "mb_output_handler" with "ob_inconv_handler" +; and you cannot use both "ob_gzhandler" and "zlib.output_compression". ;output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) -; +; Note: Resulting chunk size may vary due to nature of compression. PHP +; outputs chunks that are few handreds bytes each as a result of compression. +; If you want larger chunk size for better performence, enable output_buffering +; also. ; Note: output_handler must be empty if this is set 'On' !!!! ; Instead you must use zlib.output_handler. -; zlib.output_compression = Off ; You cannot specify additional output handlers if zlib.output_compression Index: php4/php.ini-recommended diff -u php4/php.ini-recommended:1.94 php4/php.ini-recommended:1.95 --- php4/php.ini-recommended:1.94 Fri Aug 9 18:29:58 2002 +++ php4/php.ini-recommended Sat Aug 10 22:32:49 2002 @@ -105,21 +105,23 @@ ; example, if you set output_handler to "mb_output_handler", character ; encoding will be transparently converted to the specified encoding. ; Setting any output handler automatically turns on output buffering. -; NOTE: People who wrote portable scripts should not depend on this ini -; directive. Instead, explicitly set the output handler using ob_start(). -; Using this ini directive may cause problems unless you know what script -: is doing. -; NOTE: You cannot use both "mb_output_handler" with "ob_inconv_handler" -; and you cannot use both "ob_gzhandler" and "zlib.output_compression". +; Note: People who wrote portable scripts should not depend on this ini +; directive. Instead, explicitly set the output handler using ob_start(). +; Using this ini directive may cause problems unless you know what script +: is doing. +; Note: You cannot use both "mb_output_handler" with "ob_inconv_handler" +; and you cannot use both "ob_gzhandler" and "zlib.output_compression". ;output_handler = ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) -; +; Note: Resulting chunk size may vary due to nature of compression. PHP +; outputs chunks that are few handreds bytes each as a result of compression. +; If you want larger chunk size for better performence, enable output_buffering +; also. ; Note: output_handler must be empty if this is set 'On' !!!! ; Instead you must use zlib.output_handler. -; zlib.output_compression = Off ; You cannot specify additional output handlers if zlib.output_compression Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.142 php4/ext/zlib/zlib.c:1.143 --- php4/ext/zlib/zlib.c:1.142 Sat Aug 10 21:11:11 2002 +++ php4/ext/zlib/zlib.c Sat Aug 10 22:32:49 2002 @@ -18,7 +18,7 @@ | Jade Nicoletti <nicoletti@nns.ch> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.142 2002/08/11 01:11:11 yohgaki Exp $ */ +/* $Id: zlib.c,v 1.143 2002/08/11 02:32:49 yohgaki Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -1013,8 +1013,6 @@ return FAILURE; } - if (OG(ob_nesting_level)==0) - php_start_ob_buffer(NULL, buffer_size, 0 TSRMLS_CC); php_ob_set_internal_handler(php_gzip_output_handler, (uint)(buffer_size*3/2), "zlib output compression", 0 TSRMLS_CC); if (ZLIBG(output_handler) && strlen(ZLIBG(output_handler))) { php_start_ob_buffer_named(ZLIBG(output_handler), 0, 1 TSRMLS_CC);

« previous php.cvs (#13256) next »