|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-24 14:31 UTC] 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...
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 06 03:00:02 2026 UTC |
The test cases already provided remain valid. Using PHP 5.6.40 on CentOS Linux release 7.7.1908 (Core), we experience the same issue. It has proven possible however, to work around the bug by using a second level of output buffering: // script 3 <? ob_start('ob_gzhandler'); ob_start(); print(str_repeat('a',5)); ob_end_clean(); print(str_repeat('b',5)); ob_end_flush(); ?>