From:             jflatnes at vt dot edu
Operating system: Linux 2.6.29
PHP version:      5.2.10
PHP Bug Type:     Zlib Related
Bug description:  zlib.output_compression does not ouput HTTP headers when set 
to a string value

Description:
------------
When the configuration option 'zlib.output_compression' is set to a
boolean value, output is compressed and the appropriate HTTP headers are
sent.  When the option is set to a string like 'true' or 'On', the output
is compressed, but no headers are sent, causing browsers to fail to
interpret the output as compressed.

Reproduce code:
---------------
<?php

ini_set('zlib.output_compression', 'On');

echo 'hello, world';

?>

Expected result:
----------------
The output "hello, world" to be gzip/deflate compressed as appropriate for
Accept-Encoding, and the Content-Encoding and Vary HTTP headers to be set.

Actual result:
--------------
Instead, the output is indeed gzip-compressed, but the Content-Encoding
and Vary headers are not set.

The actual text that the browser prints is:

‹&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;ÊHÍÉÉ×Q(Ï/ÊI&#65533;&#65533;&#65533;ÿÿ&#65533;:r«ÿ
&#65533;&#65533;&#65533;

Note, this works correctly with the an ini_set argument of the boolean
value true.  The documentation claims that ini_set should take string
arguments, though.  Even if a boolean/integer is required to activate
output compression, the behavior should either be "all on" or "all off".

-- 
Edit bug report at http://bugs.php.net/?id=48994&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=48994&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=48994&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=48994&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=48994&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=48994&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48994&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48994&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48994&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48994&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48994&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48994&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48994&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48994&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48994&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48994&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48994&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48994&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48994&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48994&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48994&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48994&r=mysqlcfg

Reply via email to