From: preinheimer Operating system: linux PHP version: 5.4.16 Package: Output Control Bug Type: Bug Bug description:flush() disables compression from ob_gzhandler
Description: ------------ Hi, Consider the test script. One might expect to see: Content-Encoding: gzip in the response headers, but it's not there. If however you comment out that flush() compression is applied. As a small amount of background, I work on two tools that help display data from the xhprof extension. They both include flush(); ignore_user_abort(); before doing work to store the profiling information in attempt to have as little impact on the user as possible. Clearly flush() wasn't the safe command I thought it was, as it's having a large affect on the application I'm profiling. I'm prepared to write this up in the documentation, but I don't really think this is expected behavior. Test script: --------------- <?php ob_start('ob_gzhandler'); phpinfo(); flush(); Expected result: ---------------- output compressed Actual result: -------------- no compression -- Edit bug report at https://bugs.php.net/bug.php?id=65115&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65115&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65115&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65115&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65115&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65115&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65115&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65115&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65115&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65115&r=support Expected behavior: https://bugs.php.net/fix.php?id=65115&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65115&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65115&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65115&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65115&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65115&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65115&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65115&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65115&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65115&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65115&r=mysqlcfg