Jump to content

Mysql dump results in blankfile


chillininvt

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.