#13512 [Opn->Bgs]: The backtick operator only returns stdout, not stderr
| From: | jani@php.net | Date: | Tue, 24 Jul 2007 15:40:00 +0000 |
| Subject: | #13512 [Opn->Bgs]: The backtick operator only returns stdout, not stderr | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115389@lists.php.net to get a copy of this message | ||
ID: 13512
Updated by: jani@php.net
Reported By: strecket at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: FreeBSD
PHP Version: 4.0.5
New Comment:
It works fine in the windows versions I've tried it on. And current PHP
versions don't work with Win9x anyway -> bogus.
Previous Comments:
------------------------------------------------------------------------
[2001-10-05 05:02:15] strecket at hotmail dot com
RE: edink@php.net
Yes, but that's platform specific solution, so I think it would be
better to make PHP return the output to stderr too.
For example, that doesn't work on Win9x.
------------------------------------------------------------------------
[2001-10-05 03:20:23] edink@php.net
What you want can be probably be achieved with:
$output =
command 2>&1;
------------------------------------------------------------------------
[2001-10-02 10:27:43] strecket at hotmail dot com
If I use the backtick operator, like:
$output = command goes here;
and if the program 'command' returns its output to stderr and not
stdout, then it's not easy to get the output.
Right now, it can be solved by adding:
2> /tmp/file/here
and then reading the file in the script, but that's not a good
solution.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13512&edit=1