Re: exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin);

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

 



Gert Cuykens wrote:
i do not get any output from mysql except form echo $bin that displays 1 ?
<?php
exec("mysql -h hhh -u uuu -pppp <test.php",$out,$bin);
print_r($out);
echo $bin;
?>

I don't know for sure but chances are that mysql outputs errors on stderr not stdout, so you need to redirect stderr to stdout for exec to capture it...

exec("mysql -h hhh -u uuu -pppp < test.php 2>&1",$out,$bin);

-Stut

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