In php-script through shell_exec I start creating a database table dump.
$cmd = "mysqldump -u{$selfDbConnectArray['dbuser']} -p{$selfDbConnectArray['dbPassword']} {$selfDbConnectArray['dbName']} $table | gzip > `date +{$rootDir}_service/dbbackups/$folder/$table.%Y-%m-%d.%H-%M-%S.sql.gz`"; shell_exec($cmd); I run a php script through the console, everything works fine. I run the script through the browser - mysqldump creates an empty file, and if you use gzip compression, then the file size is 20B
Why? Why can't I run backup through the browser? how to do it?
which mysqldump). Most likely, under the web server in the PATH environment variable the path to the folder where mysql is located is not specified. - cronfy