I'm trying to run mysqldump from PHP on a shared hosting server. For some reason the dump is failing and I'm getting a 0 length file.
I've included a code snippet and the results below. Note that if I put in the "or die" it dies.
//Verify that the DB and user info is good
$dbLink = mysql_connect($custDBHost, $custDBUser, $custDBPswd);
print "dbLink = $dbLink<br><br>";
$ok = mysql_select_db($custDBName, $dbLink);
print "ok = $ok<br><br>";
//Now try the dump
$command = "mysqldump --opt --h=$custDBHost --u=$custDBUser --p=$custDBPswd $custDBName > $backupFile";
system($command, $retVar); // or die('could not write file');
dbLink = Resource id #5
ok = 1