ID: 12803
Comment by: riseofthethorax at yahoo dot com
Reported By: blueeye at mail dot blueeye dot idv dot tw
Status: Bogus
Bug Type: Output Control
Operating System: any
PHP Version: 4.0.6
New Comment:
Yeah this would be handly especially if you are trying to
prevent prints from libraries and sublibraries from fowling up a header
when generating say pdf files from a script..
To redirect the stdout to /dev/null then when you need it, open the
stdout up again and use it to dump the contents of a pdf.. This is what
I'm trying to do now and I'm sure its a print statement that is futzing
up the stdout. Rather than fix the code for this specific use it would
be better just to be able to disable the stdout temporarily..
Previous Comments:
------------------------------------------------------------------------
[2001-08-17 04:36:34] [EMAIL PROTECTED]
Nog a bug in PHP. Support questions belong on the
[EMAIL PROTECTED] mailing list.
------------------------------------------------------------------------
[2001-08-17 04:31:46] blueeye at mail dot blueeye dot idv dot tw
Would someone tell me how to close STDOUT?
I would like to do some jobs like
<?
system("/usr/local/bin/php -q jobs.php");
?>
because I don't want it to wait for jobs.php done.
I see system() manual and know to redirect jobs.php's output
should be ok!
I tried system("..... > /dev/null") but fail (reasonable)
but I can't close STDOUT in job.php
if in perl, I can do
# job.php -> job.pl
#!/usr/bin/perl
close(stdout);
but I don't know how to close/redirect STDOUT in php.
(I've search general maillist for this!)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12803&edit=1