.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hi, Doc! Based on your reply, I uploaded your mod to the production server, and backup worked beautifully. But when trying to restore the db to the same site on my laptop, got this error (with debug=ON):
I did correct the path in the /admin/includes/languages/english/backup_mysql.php file as the readme suggested, but have no clue how to change the security permissions to allow "Internet Guest Account" to run cmd.exe. My laptop is Win XP, so could that be the problem? If yes, then please advise which option sounds better to you:Code:Checking Path: c:/5/bin/.exe/ Warning Checking Path: c:/mysql5/bin/ Warning Warning COMMAND FILES SELECTED: Warning mysqlexe="c:/mysql5/bin/mysql.exe" Warning mysqldumpexe="c:/mysql5/bin/mysqldump.exe" Warning COMMAND: "c:/mysql5/bin/mysql.exe" "--database=database" "--host=localhost" "--user=user" "--password=password" database < "c:/apache2/htdocs/site/admin/backups/db_database-20080102092929.sql" 2>&1 Error valueA: operable program or batch file. Error valueB: Warning Result code: 1 Error Failure: The database may NOT have been restored properly. Please check it carefully.
1. Make the permission changes on the laptop
2. Move the localhost site over to my desktop running Win 2000Pro and Xampp
Thanks!
If you're running MySQL on your laptop, you should be able to use phpMyAdmin to do the restore.
Or you could run the mysql.exe command from a command prompt ... basically use all the parameters that you quoted earlier:"c:/mysql5/bin/mysql.exe" "--database=database" "--host=localhost" "--user=user" "--password=password" database < "c:/apache2/htdocs/site/admin/backups/db_database-20080102092929.sql"
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks for the quick reply! phpMyAdmin always timed out - Fatal error blah blah blah - whenever I tried to restore any sql file over about 10-12 MB, which is why I wanted to use your mod instead. The db I'm trying to restore now is 17MB, and phpMyAdmin choked...again.
In the meantime, I installed the site files and your mod on my desktop's (Win2kPro) localhost (xampp), and got the same error as reported in the above post, so thought maybe the error isn't XP or Internet Guest Account related??? So, searched through the forums again, and found a new thread my earlier search didn't pick up which had this post from you:
And that was the winner - restore worked perfectly!To get around Windows' need to use quotes when handling paths that include spaces in the filename/path, simply edit line 23 from this:
to this:Code:define('OS_DELIM', '');
Code:define('OS_DELIM', '"');
So, anyone having similar problems as I described above, it seems to be an easy 2-step fix:
1. Correct the path for mysql.exe and mysqldump.exe in the /admin/includes/languages/english/backup_mysql.php file
2. Make the "define('OS_DELIM', '"');" change to /admin/backup_mysql.php file
Bingo!![]()
Last edited by rbobzin; 3 Jan 2008 at 12:17 AM.