with exec() I wouldnt assume that all the PATH info is there, just to be
sure, use hardcoded paths.

exec("/usr/bin/mysqldump > /tmp/somesql.txt", $return);


  Chris Lee

"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
> I'm running with some trouble with exec(), system() and it's friends...
> I have a MySQL backup script that somewhere have something like
> $cmd="mysqldump ...... > somefile.sql";
> if( !fopen("somefile.sql","r") ) { print error message };
> $cmd is correct... I've copy-pasted it tons of times in the command shell
> and it worked... created the 'somefile.sql' and all. But none of the
> functions (exec, system..) works. When I use system it outputs me some
> header for mysqldump and that's all...
> I've also checked the directory with getcwd()... it is in the right dir to
> execute the mysqldump...
> I'm running PHP 4.06 in Apache 1.3.12 in a Win98 machine...
> what might be?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to