PHP and shell_exec return value
Posted on 2007-12-06
I'm 100% certain that the following code should return an error, however $res appears to be null.
$res = shell_exec($this->cmd);
According to php.net documentation, the return value is the result of the command and should appear in $res. $this->cmd looks like the following:
$this->cmd = "mysqldump -Q -u $this->dbUser -p$this->dbPass $this->dbName";
$this->cmd .= ($this->zip==="bz2") ?
" | bzip2 > $this->dest". '/' ."$fname" :
" | gzip > $this->dest".'/'."$fname";
Thanks for any ideas... this should only not come back with any results for a successful dump.