zlib.output_compression on -> garbage

php.internals

Sascha Schumann

22 years ago
Is "on" supposed to produce garbage (apparently Content-Encoding is simply missing), while 1 is the one true setting? I always thought they were equivalent in the context of a boolean flag. # works php_admin_value zlib.output_compression 1 # compression, but incomplete HTTP headers php_admin_value zlib.output_compression on Tested with current PHP 4.3.5 tree. - Sascha

Jani Taskinen

22 years ago
On Sun, 8 Feb 2004, Sascha Schumann wrote:
> Is "on" supposed to produce garbage (apparently > Content-Encoding is simply missing), while 1 is the one true > setting? I always thought they were equivalent in the > context of a boolean flag. > > # works > php_admin_value zlib.output_compression 1 > > # compression, but incomplete HTTP headers > php_admin_value zlib.output_compression on > > Tested with current PHP 4.3.5 tree.
From php.ini-dist: ; 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 hundreds bytes each as a result of ; compression. If you prefer a larger chunk size for better ; performance, enable output_buffering in addition. ; Note: You need to use zlib.output_handler instead of the standard ; output_handler, or otherwise the output will be corrupted. zlib.output_compression = Off So it actually shouldn't be boolean option at all..? --Jani