Using fopen('php://stdout') with apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

The simple test case that demonstrates the problem looks like:
<?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);
?>

Using php-cli on FreeBSD:
  amorton@multivac:/home/www/multivac> php phptest.php
  You can see this with the CLI and Apache.
  This only shows up on the CLI...

Viewing the page using Apache2 and mod_php5:
  You can see this with the CLI and Apache.

Anyone know how to get a reference to the standard output to work with
the Apache2 SAPI?

Thanks,
andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux