Sent: Wednesday, February 21, 2007 7:17 AM
To: Peter Lauri
Cc: [EMAIL PROTECTED]; php-general@lists.php.net
Subject: Re: [PHP] Catch STDERR
What are your speed requirements? You can use the ssh functions can
ssh2_exec into yourself. You can get the error stream separately
then...
After the connecti
What are your speed requirements? You can use the ssh functions can
ssh2_exec into yourself. You can get the error stream separately
then...
After the connection is open, it is basically as fast as exec. But
there is a hit on connection. I wouldn't use this in webpage
environment, but I do use it
[snip]
Do you need STDERR to go "out" to, err, wherever it goes, *AND* get it
into your PHP script?
Perhaps 'tee' (man tee) would let you do that.
Or do you just need STDOUT in one variable, and STDERR in another,
both in PHP?
I think you could do something in shell to re-bind STDOUT to some
ot
On Sat, February 17, 2007 2:49 pm, Peter Lauri wrote:
> I am executing exec('some cool command', $stdout, $exitcode);
>
> That is fine. I get what I in the beginning wanted. However, now I
> need to
> catch the STDERR that the command is generating as well. Some of you
> might
> tell me to redirect
From: M.Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 11:59 AM
To: Frank Arensmeier
Cc: Peter Lauri; php-general@lists.php.net
Subject: Re: [PHP] Catch STDERR
you could instead use the proc_* functions to do this. However, seen as
those are pretty complicated and were not availab
you could instead use the proc_* functions to do this. However, seen as
those are pretty complicated and were not available in most php versions
ran by most hosts, a lot of people had to come up with other ways
around it. The most used way is indeed what you described. A simple:
$t = tempnam()
Spontaneously, my suggestion would to pipe the STDERR output from
your command to a file. I have to admit that this doesn't feel like
the most efficient solution since you would involve some reading /
writing to your filesystem.
Regards.
//frank
17 feb 2007 kl. 21.49 skrev Peter Lauri:
H
7 matches
Mail list logo