system() won't work status return 2
Posted: Sun Sep 14, 2014 2:39 pm
I can substitue values for the variables '$database' and '$filename' below and run from the command line - Works just fine.
This will return 2 and not work when run programetically. All files accessed have chmod 777.
Please ! How to fix ????
// returns 2
This will return 2 and not work when run programetically. All files accessed have chmod 777.
Please ! How to fix ????
Code: Select all
$command ="/usr/bin/mysqldump --host='localhost' --user='rick' --password='rick' --add-drop-database --databases ".$database. " | gzip > " .$filename;
$bak_result = system($command, $retval);