From: jwestbrook at gmail dot com Operating system: linux 64bit AWS ami PHP version: 5.4.17 Package: Output Control Bug Type: Bug Bug description:output buffering autostart setting php.ini
Description: ------------ We recently upgraded from php 5.3 to php 5.4 and when the php.ini output_buffering setting is set to ON or anything greater than zero the output buffering does not always reliably start. This is a problem for some scripts that have a shebang as the first line to make the script easily executable. But if you send a header or anything else after that first line it will fail. based on the script attached the contents of the error log are buffer statues : Array\n(\n)\n Test script: --------------- #!/usr/bin/php <?php $buffer_length = ob_get_length(); if($buffer_length != 15) { error_log('buffer statues : '.print_r(ob_get_status(TRUE),1)); exit; } //this header call will not always be successful header("Content-type: application/pdf"); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=65416&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65416&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65416&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65416&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65416&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65416&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65416&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65416&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65416&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65416&r=support Expected behavior: https://bugs.php.net/fix.php?id=65416&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65416&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65416&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65416&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65416&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65416&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65416&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65416&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65416&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65416&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65416&r=mysqlcfg