From: drewish at katherinehouse dot com Operating system: Windows XP / FreeBSD 5 PHP version: 5.0.5 PHP Bug Type: Apache2 related Bug description: fopen('php://stdout') / fputs() doesn't send output under Apache2 SAPI
Description: ------------ I'm trying to move some code that was written for the CLI to the web. It makes extensive use fprintf() and fputs() and under Apache2 it give no output. Reproduce code: --------------- <?php $fp = fopen('php://stdout', 'w'); if ($fp === false) { die('open failed.'); } print "You can see this with the CLI and Apache.\n"; fputs($fp, "This only shows up on the CLI...\n"); fclose($fp); ?> Expected result: ---------------- Under FreeBSD: [EMAIL PROTECTED]:/home/www/multivac> php phptest.php You can see this with the CLI and Apache. This only shows up on the CLI... Under Windows XP: D:\temp>php phptest.php You can see this with the CLI and Apache. This only shows up on the CLI... Actual result: -------------- Viewing the page using Apache2 and mod_php5: You can see this with the CLI and Apache. -- Edit bug report at http://bugs.php.net/?id=34627&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34627&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34627&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34627&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34627&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34627&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34627&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34627&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34627&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34627&r=support Expected behavior: http://bugs.php.net/fix.php?id=34627&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34627&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34627&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34627&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34627&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34627&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34627&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34627&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34627&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34627&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34627&r=mysqlcfg