Wonder if anyone out there can help?
I'm trying to execute a mysql dump on my local Mac (running 10.4), and I'm running into an odd problem, possibly something to do with permissions or $PATH setup.
Here's the code...
$dbhost = 'localhost'; $dbuser = 'user'; $dbpass = 'blah'; $dbname = 'property_rental';
$filepath = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
$filename = "$filepath/data.sql";
passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname > $filename");
Now, if I execute this on the remote server, with the correct login details, it all works tickety-boo. If I execute it locally on my Mac using the built-in Apache server and a localhost address. But if I change the passthru call to an echo, and then copy and past the result into the terminal app, it works. What am I doing wrong? Any ideas greatfully received.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php