Re: help with exec()...
| From: | Chris Lee | Date: | Fri, 05 Oct 2001 21:45:09 +0000 |
| Subject: | Re: help with exec()... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70146@lists.php.net to get a copy of this message | ||
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);
print_r($return);
--
Chris Lee
lee@mediawaveonline.com
"Christian Dechery" <cdechery@easynet.com.br> wrote in message
news:5.1.0.14.2.20011005154313.024a7310@pop3.norton.antivirus...
> 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?
>