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:
  [EMAIL PROTECTED]:/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

Reply via email to