Bug #61820 [Asn->Csd]: using ob_gzhandler will complain about headers already sent when no compression

From: Date: Tue, 24 Apr 2012 17:56:16 +0000
Subject: Bug #61820 [Asn->Csd]: using ob_gzhandler will complain about headers already sent when no compression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-169921@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61820&edit=1

 ID:                 61820
 Updated by:         mike@php.net
 Reported by:        magicaltux@php.net
 Summary:            using ob_gzhandler will complain about headers
                     already sent when no compression
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Zlib related
 Operating System:   Linux
 PHP Version:        5.4.0
 Assigned To:        mike
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-04-24 17:53:55] mike@php.net

Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df00b64cb93dafbe5ae47bf733e826b54b32ae37
Log: fixed bug #61820

------------------------------------------------------------------------
[2012-04-23 00:19:08] magicaltux@php.net

Description:
------------
When using ob_gzhandler with PHP 5.4.0+, PHP will emit warnings after flushing 
more than once (it looks like it's trying to modify headers on each flush).

This problem didn't exist in PHP 5.3.


Test script:
---------------
<?php

ob_start('ob_gzhandler');

echo "PHP VERSION ".phpversion()."\n";
ob_flush();
flush();

echo "This is confusing:\n";
ob_flush();
flush();


Expected result:
----------------
PHP VERSION 5.5.0-dev
This is confusing:

Actual result:
--------------
PHP VERSION 5.5.0-dev
This is confusing:

Warning: Cannot modify header information - headers already sent by (output 
started at php-src/moo.php:6) in php-src/moo.php on line 10



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61820&edit=1


Thread (3 messages)

« previous php.bugs (#169921) next »