note 107814 added to function.system

From: Date: Wed, 07 Mar 2012 13:40:03 +0000
Subject: note 107814 added to function.system
Groups: php.notes 
Request: Send a blank email to php-notes+get-186522@lists.php.net to get a copy of this message
On a controlled Windows Hosting (XP or Server 2003), if system("mysqldump... >filename.sql") is creating sql file, but not dumping data, try giving the complete path to the mysqldump.exe. Try the following command. Notice the double quotes and some escapes in the command. $mysqlDumpCommand = "\"C:\\Program Files\\MySQL\\MySQL Server 5.5\\bin\\mysqldump.exe\" -u ".$userName.' -p'.$password.' --databases ' . $databaseName . '>' . $sqlFileName; system(sprintf($mysqlDumpCommand)); ---- Server IP: 59.162.86.8 Probable Submitter: 14.99.75.245 ---- Manual Page -- http://www.php.net/manual/en/function.system.php Edit -- https://master.php.net/note/edit/107814 Del: integrated -- https://master.php.net/note/delete/107814/integrated Del: useless -- https://master.php.net/note/delete/107814/useless Del: bad code -- https://master.php.net/note/delete/107814/bad+code Del: spam -- https://master.php.net/note/delete/107814/spam Del: non-english -- https://master.php.net/note/delete/107814/non-english Del: in docs -- https://master.php.net/note/delete/107814/in+docs Del: other reasons-- https://master.php.net/note/delete/107814 Reject -- https://master.php.net/note/reject/107814 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186522) next »