ID: 36514
Updated by: mike@php.net
Reported By: lunter at interia dot pl
-Status: Analyzed
+Status: Suspended
Bug Type: Output Control
Operating System: winXP
PHP Version: 5.1.2
New Comment:
Cannot be fixed with current Output Control code.
Previous Comments:
------------------------------------------------------------------------
[2006-02-26 17:22:14] mike@php.net
Ok, seems to be as follows:
ob_clean() discards the gzip header bytes, but doesn't cause the gz
handler to restart.
------------------------------------------------------------------------
[2006-02-26 16:55:16] mike@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Works fine here actually.
------------------------------------------------------------------------
[2006-02-25 23:04:59] mike@php.net
ob_clean() restarts the gz handler.
------------------------------------------------------------------------
[2006-02-24 14:35:35] lunter at interia dot pl
PS. Please note that ob_clean() function does not destroy the output
buffer, but only clean (erase) the output buffer.
http://pl2.php.net/manual/en/function.ob-clean.php
------------------------------------------------------------------------
[2006-02-24 14:31:23] lunter at interia dot pl
Description:
------------
ob_gzhandler() issue
Reproduce code:
---------------
// script 1
<?
ob_start('ob_gzhandler');
print(str_repeat('a',5));
ob_clean();
print(str_repeat('b',5));
ob_end_flush();
?>
// script 2
<?
ob_start();
print(str_repeat('a',5));
ob_clean();
print(str_repeat('b',5));
ob_end_flush();
?>
Expected result:
----------------
Script 1 (using compression) output from buffer to browser: "bbbbb"
like Script 2 output from buffer to browser: "bbbbb"
Actual result:
--------------
Script 1 (using compression) output from buffer to browser incorect
data...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36514&edit=1