Re: Backup MySQL Database
Quote:
Originally Posted by ts232
Nope that didn't fix it. For now I'm using mysqldump from the shell. Can't find any info about the mentioned security restrictions being implemented on my host. If anyone has any ideas I am all ears, otherwise I'll stick with the shell approach.
When you installed or upgraded Zen Cart the pre-flight check (install wizard) should have indicated some of this.
Go to Admin > Tools > Server Info to observe your server configuration [same as phpinfo()] and a little bit more info.
Woody
Re: Backup MySQL Database
Quote:
Originally Posted by ts232
Can't find any info about the mentioned security restrictions being implemented on my host.
Also I meant to mention that if you have any questions regarding security restrictions implemented by your host then by all means you should contact your hosting provider :wink2:
Woody
Re: Backup MySQL Database
Quote:
Originally Posted by Woodymon
When you installed or upgraded Zen Cart the pre-flight check (install wizard) should have indicated some of this.
Go to Admin > Tools > Server Info to observe your server configuration [same as phpinfo()] and a little bit more info.
Woody
Good tip, thanks for your help. Dreamhost has an install instructions for the wizard that informs us to just ignore the pre-flight check results. :blush: Here's what I pulled out from the Server Info that might be relevant (based on what the Caveats in the install were). The only mentioned caveat that I couldn't find info on was possible restrictions on exec(), so I will bug my host about that unless someone here knows a way to check that.
open_basedir no value no value
safe_mode Off Off
safe_mode_exec_dir no value no value
Re: Backup MySQL Database
Quote:
Originally Posted by ts232
Dreamhost has an install instructions for the wizard that informs us to just ignore the pre-flight check results. :blush:
TS-
Since "Dreamhost" managed your Zen Cart installation you should be forward your questions on to them.
Myself I recommend storeowners avoid the canned script/one-click/Fantastico type installation service and instead install the "Zen Cart way" (via zc_install). With the zc_install step-by-step method you learn about all the configuration details required for installation, basic database configuration information, directory paths, server specifications and many other details you will need to know later to "upgrade" your cart and apply various modifications/customizations. And with such info at hand you will be able to answer many of your own questions that come up later and therefore won't need to rely on your host so much for support, and for that matter the Zen Cart forums. Also throughout the zc_install process you are pointed to webpages with much useful and easy to understand help documentation that is a MUST read. Especially security information!
With the canned script install process you miss all this and more.
"The pros and cons of hitchhiking" :wink2:
Woody
Re: Backup MySQL Database
Quote:
Originally Posted by Woodymon
TS-
Myself I recommend storeowners avoid the canned script/one-click/Fantastico type installation service and instead install the "Zen Cart way" (via zc_install). With the zc_install step-by-step method you learn about all the configuration details required for installation, basic database configuration information, directory paths, server specifications and many other details you will need to know later to "upgrade" your cart and apply various modifications/customizations. And with such info at hand you will be able to answer many of your own questions that come up later and therefore won't need to rely on your host so much for support, and for that matter the Zen Cart forums. Also throughout the zc_install process you are pointed to webpages with much useful and easy to understand help documentation that is a MUST read. Especially security information!
With the canned script install process you miss all this and more.
"The pros and cons of hitchhiking" :wink2:
Woody
Woody, your points are well taken. In defense of the one-click install however, it was a low cost way for me to check out zencart and realize what a great product it is compared to my creaking old oscommerce shop. Had it not been for the one-click I probably would not have taken the time to try installing yet another ecommerce system. ;)
Re: Backup MySQL Database
Quote:
Originally Posted by ts232
Woody, your points are well taken. In defense of the one-click install however, it was a low cost way for me to check out zencart and realize what a great product it is compared to my creaking old oscommerce shop. Had it not been for the one-click I probably would not have taken the time to try installing yet another ecommerce system. ;)
TS- I certainly understand and no defense needed. That is why closed with: "The pros and cons of hitchhiking". Or I could have said "there is no free lunch". In other words there are "opportunity costs" to ALL choices we make (inlcuding a cost to not making a choice).
Woody
Re: Backup MySQL Database
Quote:
Originally Posted by ts232
Good tip, thanks for your help. Dreamhost has an install instructions for the wizard that informs us to just ignore the pre-flight check results. :blush: Here's what I pulled out from the Server Info that might be relevant (based on what the Caveats in the install were). The only mentioned caveat that I couldn't find info on was possible restrictions on exec(), so I will bug my host about that unless someone here knows a way to check that.
open_basedir no value no value
safe_mode Off Off
safe_mode_exec_dir no value no value
Please keep me posted on anything you find as I'm also on Dreamhost and would like to get the backup command working. Just an easier cleaner method then doing it manually.
-Wayne
Re: Backup MySQL Database
I turned on the debug mode and am poking around with it now. Here's the debug trace on the problem. The mysqldump and mysql execs are in place on the (linux) server where my zencart install resides (takspeed.com), but I am guessing the problem lies on the sql server mysql.takspeed.com . I don't seem to have shell access to that server (using dreamhost) to check on that. Any ideas for where to look beyond this?
Code:
Checking Path: /usr/bin/
Warning
Warning COMMAND FILES SELECTED:
Warning mysqlexe="/usr/bin/mysql"
Warning mysqldumpexe="/usr/bin/mysqldump"
Warning COMMAND: "/usr/bin/mysqldump" "--host=mysql.takspeed.com" "--user=xxxxxx" "--password=xxxxxx" --opt --complete-insert "--result-file=/home/takspeed/takspeed.com/shop/tsadmin/backups/db_zentakspeed-20060602104016.sql" zentakspeed 2>&1
Warning Result code: 127
Error valueA:
Error valueB:
Error ERROR: Could not locate the MYSQLDUMP backup utility. BACKUP FAILED.
Re: Backup MySQL Database
Here is the fragment of code where the error is tripped, the result of 127 branch is where it is happening:
Code:
if (file_exists(DIR_FS_BACKUP . $backup_file) && ($dump_results == '0' || $dump_results=='')) { // display success message noting that MYSQLDUMP was used
$messageStack->add_session('<a href="' . ((ENABLE_SSL_ADMIN == 'true') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN) . 'backups/' . $backup_file . '">' . SUCCESS_DATABASE_SAVED . '</a>', 'success');
} elseif ($dump_results=='127') {
$messageStack->add_session(FAILURE_DATABASE_NOT_SAVED_UTIL_NOT_FOUND, 'error');
} else {
$messageStack->add_session(FAILURE_DATABASE_NOT_SAVED, 'error');
}
Re: Backup MySQL Database
Hmmm... so when I extract the mysqldump command from the php script and run it from the command line it works fine (see below). So the problem must lie in the script wrapper. I'm not a php expert, any ideas?
Code:
/usr/bin/mysqldump --host=mysql.takspeed.com --user=xxxxxx --password=xxxx --opt --complete-insert --result-file=/home/takspeed/takspeed.com/shop/tsadmin/backups/db_zentakspeed-20060602104016.sql zentakspeed