Re: exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin);
| From: | Gert Cuykens | Date: | Wed, 25 Oct 2006 21:05:21 +0000 |
| Subject: | Re: exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin); | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243631@lists.php.net to get a copy of this message | ||
ok thx all, works great now :)
On 10/25/06, Stut <stuttle@gmail.com> wrote:
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