I've the code shown below but nothing happens after execution
system('mysqldump -u USER -pPASS DB > /tmp/bckp.sql');
What is wrong with this code?
Sultan
I've the code shown below but nothing happens after execution
system('mysqldump -u USER -pPASS DB > /tmp/bckp.sql');
What is wrong with this code?
Sultan
there could be thausands of things going wrong:
echo system(...
- and whats the result?some more information would be realy useful to help you.
You most likely need to specify the full path to mysqldump as it probably isn't in your PATH environment variable for the user PHP is running as. Go to command line on the server and run
which mysqldump
It will spit out the full path. Then replace mysqldump in your system()
command with that full path