Results 1 to 5 of 5

Thread: a little confusion

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member half flung pie's Avatar
    Join Date
    Jun 2005
    Location
    South Carolina, USA
    Posts
    317

    a little confusion

    I'm trying to use mysqldump and have the following PHP code
    Code:
    	$username = "root";
    	$password = "password";
    	$db = "mydb";
    	$backpath = "C:\inetpub\wwwroot\site\backups\\" . $db . "-backup-" . date("Y-m-d-H-i-s") . ".sql";
    	$exec = "mysqldump --user={$username} --password={$password} --quick --add-drop-table --add-locks --extended-insert --lock-tables --all {$db} > $backpath";
    	exec($exec);
    This code apparently does not work though. There are no files saved in that directory after running the code. However, if I run
    Code:
    mysqldump --user=root --password=password --quick --add-drop-table --add-locks --extended-insert --lock-tables --all mydb > C:\inetpub\wwwroot\site\backups\mydb-backup-2010-07-12-14-53-50.sql
    in a command prompt, it works just fine. Any ideas why it won't run through PHP?

    Also, safe_mode = Off in my php.ini file
    Last edited by half flung pie; Jul 12th, 2010 at 02:56 PM.

    Base 2
    Fcnncu"Nqxgu"Lguug##

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width