From: justin at onyourmark dot com
Operating system: FreeBSD 4.10-STABLE
PHP version: 4.3.7
PHP Bug Type: Output Control
Bug description: ob_start('ob_gzhandler') and ob_clean() in a function.
Description:
------------
The output buffer stops working if:
1) the output buffer was started with ob_start('ob_gzhandler');
2) a ob_clean() call is made from within a function.
Any subsequent ob_flush()/ob_end_flush()/ob_get_contents(), ect results in
nothing being returned.
Bug #24951 seems to be similar to the problem I'm having. I'll run similar
tests and report back the results, unless the issue is positivly identified
before I finish the tests.
Reproduce code:
---------------
<?php
ob_start('ob_gzhandler');
echo "Shouldn't be displayed<br>";
test("Should be displayed<br>\n");
echo "Should be displayed too<br>";
ob_end_flush();
function test($str)
{
ob_clean();
echo $str;
}
?>
Expected result:
----------------
Should be displayed<br>
Should be displayed too<br>
--
Edit bug report at http://bugs.php.net/?id=29125&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29125&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29125&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29125&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29125&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29125&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29125&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29125&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29125&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29125&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29125&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29125&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29125&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29125&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29125&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29125&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29125&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29125&r=float