Okay, I took out all the reason for error, I took the variables out of the code and replaced them with the actual values. I do not execute the gzip function. All I get is an empty file. Also I made sure the back up directory is set to 777.
Now phpMySQLAdmin will perform the same function, so there must be a way to do this without the phpMySQLAdmin program? Has anyone tried to do what I am trying to do? Has anyone tried with this code? One more thing, I borrowed a free script written in perl that uses mysqldump and it worked. The point here is that I want this to work in PHP so I can include this code in a bigger application I am writing. Thanks for all your ideas! "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 000001c27058$c1770170$7c02a8c0@coconut">news:000001c27058$c1770170$7c02a8c0@coconut... > > Okay here is the new code and this is still not working. > > > > <?php > > > > require("./config.php"); > > > > $sqlserver = $server1; > > $sqlusername = $username1; > > $sqlpassword = $password1; > > $sqldatabase = $database1; > > > > //****************************** > > $nam_bak=date('D,d-m-Y'); > > Can you have a filename with a comma in it? > > > exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\" > > > > $backupdir/$nam.sql"); > > Take out the \" quotes around username, password, and database. > > > > > exec("gzip $backupdir/$nam.sql"); > > ---John Holmes... > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php