Even quicker to automate it:
https://github.com/torvista/zen-cart_backup_MySQL_auto
Printable View
Even quicker to automate it:
https://github.com/torvista/zen-cart_backup_MySQL_auto
Zen Cart 1.55e, newest version available v5d of the plugin fails backup. It goes through the motions with any selected option or combination and a 58 byte properly named and saved file is created or downloaded depending on the selections. The files are all empty.
On page reload the 1045 error posts in the admin header.
Works less now on 1.55e than it did before the update also my previous posts #169 #168 have not been corrected.
Poses the question what does this actually work on and has it been properly tested?
Couldn't say, I did a lot of changes to that a long time ago. As usual I got carried away and made so many changes I never got round to uploading it.Quote:
has it been properly tested?
Works for me, on my Github. Comments welcome.
@twitchtoo Can you post some information on your environment? (OS, PHP version, MySQL version, etc.) I will check.
Are you saying 1.5c did work and 1.5d does not work?
Client one:
Zen Cart 1.55e
Linux 2.6
Php 5.6
MySQL 5.5
Backup MySQL Database version 1.5c - works in one button position only - referred to in previous post #168-169
Client two:
Zen Cart 1.55f
Linux 2.6
Php 7.1
MySQL 5.6
Backup MySQL Database version 1.5c - works in one button position only - referred to in previous post #168-169
Client one and two update to Backup MySQL Database version 1.5d
- posts only 58 byte file backups
Then I guess I'm stumped. You can see that the differences between 5c (left) and 5d (right) are small.
Can you do some testing with escapeshellcmd on your system and check the results? This works fine for me in similar environments.Code:125c125
< $dump_params .= ' "--password=' . DB_SERVER_PASSWORD . '"';
---
> $dump_params .= ' "--password=' . escapeshellcmd(DB_SERVER_PASSWORD) . '"';
258c258
< $load_params .= ((DB_SERVER_PASSWORD =='') ? '' : ' "--password=' . DB_SERVER_PASSWORD . '"');
---
> $load_params .= ((DB_SERVER_PASSWORD =='') ? '' : ' "--password=' . escapeshellcmd(DB_SERVER_PASSWORD) . '"');
Maybe try changing it to escapeshellarg() but remove the single quotes around the argument.
Has anyone had any luck using this with the new release, 1.5.6? Just got it installed but it is not showing up under the Tools drop down.