Re: Redirecting STDERR to a file?

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

 



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.

Having come to this rather late, I recently wrote some code that may be of some help to you which forks processes: http://www.phpguru.org/downloads/pcntl/

You need pcntl and it only works on *nix (I understand). It does make fork()ing somewhat easier though. Be careful of defunct processes though.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and Helpdesk software for £299pa hosted for you -
no installation, no maintenance, new features automatic and free

--
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