Re: Backup MySQL Database
There should not be any "going wrong".
I assume this is now happening on a unix server?
If Line 230 is
$paths_auto = str_replace('mysql', '', trim(shell_exec('which mysql')));
it's not finding the mysql tool.
You can trap the error at least with this.
change it to:
$which_mysql = @shell_exec('which mysql');
if ($which_mysql !== null && $which_mysql !== false) {
$paths_auto = str_replace('mysql', '', trim($which_mysql));
}
Re: Backup MySQL Database
Thanks for your reply Steve and help with this!
My server is a: Linux 4.18.0-553.8.1.el8_10.x86_64
I will try this code edit and post back once I've had the chance to give it go.
Thanks again...
Jeff
Re: Backup MySQL Database
Success!!
I applied this code change to zc_plugins/BackupMySQL/v2.0.0/admin/backup_mysql.php on line 230 and was successful in backing up my database! I tried the Restore and it worked too!
Thanks again for your continued help with this plugin....it is very much appreciated!
Re: Backup MySQL Database
Is there a Backup Plugin for Zencart 2.1.0?
Re: Backup MySQL Database
The version in my signature is compatible with the current version 2.1.0 and the development version.
Re: Backup MySQL Database
Installed Zen_Cart-Backup_MYSQL_Plugin-main and it installed using your instructions but when I run it I get errors.
Result code: ($dump_results) 1
console $output: [0] => "'unknown' is not recognized as an internal or external command,
console $output: [1] => "operable program or batch file.
Failure: The database has NOT been saved.
2 debug-log files exist, click here to view.
MySQL tools (mysql, mysqldump) not found.
Error Log
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(390): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Undefined variable $rInfo in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 390.
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(390): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Attempt to read property "reviews_id" on null in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 390.
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(392): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Undefined variable $rInfo in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 392.
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(392): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Attempt to read property "products_name" on null in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 392.
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(393): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Undefined variable $rInfo in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 393.
[10-Feb-2025 21:25:33 Europe/Berlin] Request URI: /tennesseetraditionalflies.com/fishing/index.php?cmd=reviews&status=1&rID=62&action=delete, IP address: ::1, Language id 1
#0 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php(393): zen_debug_error_handler()
#1 C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\index.php(16): require('C:\\xampp\\htdocs...')
--> PHP Warning: Attempt to read property "reviews_id" on null in C:\xampp\htdocs\tennesseetraditionalflies.com\fishing\reviews.php on line 393.
Re: Backup MySQL Database
Those error logs don't appear to have anything to do with the backup.
You are on a local server. Windows/Unix? What LAMP environment?
Add &debug=ON to the url and refresh the page, you'll see the list of places where the script is trying (and failing) to find the mysql tools.
You'll need to add the correct location on your server to the list in $pathsearch at line 254 \zc_plugins\BackupMySQL\v2.0.0\admin\backup_mysql.php
Re: Backup MySQL Database
Quote:
Originally Posted by
torvista
Those error logs don't appear to have anything to do with the backup.
You are on a local server. Windows/Unix? What LAMP environment?
Add &debug=ON to the url and refresh the page, you'll see the list of places where the script is trying (and failing) to find the mysql tools.
You'll need to add the correct location on your server to the list in $pathsearch at line 254 \zc_plugins\BackupMySQL\v2.0.0\admin\backup_mysql.php
############################################################
I am running on XAMPP in development and production on SITEGROUND hosting.
Re: Backup MySQL Database
The path for MYSQL is "C:\xampp\mysql". What would I change in line 254?
Re: Backup MySQL Database
Change
Quote:
$pathsearch = array_merge($possiblePaths, [
$paths_auto,
'/usr/bin/',
'/usr/local/bin/',
'/usr/local/mysql/bin/',
'c:/mysql/bin/',
'd:/mysql/bin/',
'e:/mysql/bin/',
'c:/server/mysql/bin/',
'\'c:/Program Files/MySQL/MySQL Server 5.0/bin/\'',
'\'d:\\Program Files\\MySQL\\MySQL Server 5.0\\bin\\\''
]);
to
Quote:
$pathsearch = array_merge($possiblePaths, [
$paths_auto,
'/usr/bin/',
'/usr/local/bin/',
'/usr/local/mysql/bin/',
'c:/mysql/bin/',
'd:/mysql/bin/',
'e:/mysql/bin/',
'c:/server/mysql/bin/',
'\'c:/Program Files/MySQL/MySQL Server 5.0/bin/\'',
'\'d:\\Program Files\\MySQL\\MySQL Server 5.0\\bin\\\'',
'C:\xampp\mysql'
]);