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>"; ?> Link to comment https://forums.phpfreaks.com/topic/57357-mysql-dump-results-in-blankfile/ 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? Link to comment https://forums.phpfreaks.com/topic/57357-mysql-dump-results-in-blankfile/#findComment-283809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.