For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2004 > Re: [PHP-DB] mysqldump









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] mysqldump
David Orlovich

2004-11-09, 3:55 pm

I wonder if you need to specify the full pathname for mysqldump - when
it's being executed by a script it may not know where mysqldump is,
whereas if you execute it yourself your PATH tells it where to go,
which might be why it works under that circumstance. HTH, David.

On 10/11/2004, at 6:59 AM, Aaron Todd wrote:

> I have created a PHP script that looks like:
>
> <?php
> $filename = "/var/www/html/db_backup_" . date("n-j-y").".sql";
> exec('mysqldump -u ***** -p***** database > $filename');
> ?>
>
> For some reason this doesnt work and I cant figure out why. There is
> no
> error that comes back. When I run the mysqldump command from the
> server
> console it produces the file fine. I have read a few other posts out
> there
> about this same thing which resulted in the location the file was being
> saved. But I have gone through my server and found nothing. Does
> anyone
> have any suggestions for regarding this.
>
> Thanks,
>
> Aaron
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com