Re: exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin);
| From: | Stut | Date: | Wed, 25 Oct 2006 20:50:15 +0000 |
| Subject: | Re: exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin); | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243630@lists.php.net to get a copy of this message | ||
Gert Cuykens wrote:
BINGO :)Indeed.
ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1)Array ( [0] => ERROR 2005 (HY000): Unknown MySQL server host 'hhh' (1) ) 1 Can you explain a bit more what this do ? 2>&1 For example will i only get stderr or do i get stdout and stderr messages ?The 2>&1 syntax redirects stderr to stdout, it does not do anything with stdout. So yes, you will still also get stdout messages. This no longer has anything to do with PHP. I suggest you Google for info on Linux pipes. -Stut