Re: Redirecting STDERR to a file?
| From: | js | Date: | Sat, 02 Feb 2008 13:31:37 +0000 |
| Subject: | Re: Redirecting STDERR to a file? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268564@lists.php.net to get a copy of this message | ||
> > C would be the last resort. I suppose it would be easily done in Perl,
> > but most of my colleagues prefer PHP.
> > I love to make taking over the code easy, so PHP is more preferable to
> > me.
>
> That makes perfect sense, but sometimes PHP is not the best/right
> answer.
>
> What I think you need to do is:
>
> parent: fork() your child process, then do whatever.
> child: use proc_open to call your program and redirect stderr.
That's kind of odd, but seems to be the only way to workaround this...
Thanks for you help.