chillininvt Posted June 27, 2007 Share Posted June 27, 2007 I am trying to get my script working to back up a mysql database. Everything works fine only the output results in a blank file. <?php $recipient = ""; $message = '<p><a href="http://www..com/CMSdb.sql">Click here for you database backup Of the CMS</a></p> <p><a href="http://www..com/LIVEdb.sql">Click here for you database backup Of the Live Site </a> </p>'; $from = ""; exec("chmod 777 CMSdb.sql"); exec("chmod 777 LIVEdb.sql"); exec("mysqldump --opt -u user-p pass dvb_cms > CMSdb.sql"); exec("mysqldump --opt -u user -p pass dvb_live > LIVEdb.sql"); mail($recipient, 'DATABASE BACKUP', $message, 'From:'.$from.''); exec("chmod 775 CMSdb.sql"); exec("chmod 775 LIVEdb.sql"); echo "<h1>Your Database Has Been Backedup </h1>"; ?> Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted June 27, 2007 Share Posted June 27, 2007 perhaps the link in the email body should be to a php page which includes the SQL rather than an SQL page itself? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.