I'm trying to use mysqldump and have the following PHP code
This code apparently does not work though. There are no files saved in that directory after running the code. However, if I runCode:$username = "root"; $password = "password"; $db = "mydb"; $backpath = "C:\inetpub\wwwroot\site\backups\\" . $db . "-backup-" . date("Y-m-d-H-i-s") . ".sql"; $exec = "mysqldump --user={$username} --password={$password} --quick --add-drop-table --add-locks --extended-insert --lock-tables --all {$db} > $backpath"; exec($exec);
in a command prompt, it works just fine. Any ideas why it won't run through PHP?Code:mysqldump --user=root --password=password --quick --add-drop-table --add-locks --extended-insert --lock-tables --all mydb > C:\inetpub\wwwroot\site\backups\mydb-backup-2010-07-12-14-53-50.sql
Also, safe_mode = Off in my php.ini file




Base 2
Reply With Quote