Re: Backup MySQL Database
Hi, when I want to make a backup with "backup mysql" plugin, I get following messges.
"You do not have SSL enabled. Any downloads you do from this page will not be encrypted. Doing backups and restores will be fine, but download/upload of files from/to the server presents a security risk".
I have SSL-certificate installed on my webhost server, so what could be the reason why I get that message?
I will appreciate any help with this problem please.
https://gaigear.com
Zen-Cart v. 1.5
Template: Mobishop Blue, from
backup mysql
Populat 4
ZX Slideshow
Ckeditor
Google Language
Php v. 5.6.24
Re: Backup MySQL Database
Hi, I have a problem with a security message. When I want to make a backup with "backup mysql" plugin, I get following messge:
"You do not have SSL enabled. Any downloads you do from this page will not be encrypted. Doing backups and restores will be fine, but download/upload of files from/to the server presents a security risk".
The thing is, I have SSL installed, and I had it confirmed yesterday, that the "SSL-certificate" is installed correct.
I would appreciate it very much, if someone in here could help me, how i can fix this problem please.
Zen Cart v. 1.5.5
Easy Populate 4
Google Language
CKeditor
ZX-Slideshow
and of course backup mysql
Tempate: Mobishop from 12leaves.com
Re: Backup MySQL Database
Do you have SSL enabled in the configure files?
Re: Backup MySQL Database
Quote:
Originally Posted by
pubaolao
Any downloads you do from this page will not be encrypted. Doing backups and restores will be fine, but download/upload of files from/to the server presents a security risk"
1. As the message said, doing backups and restores will be fine.
2. The entire message will disappear once you fix the SSL issues you have with your site. You're already discussing them in another thread, so let's leave that discussion over there. Securing your Admin is as simple as using https URLs in your admin configure.php. Again, discuss it in the OTHER thread where you're already sorting that out.
Re: Backup MySQL Database
Hi, after install I have this problem
Result code: 1
0 => '"mysqldump"' is not recognized as an internal or external command,
1 => operable program or batch file.
Failure: The database has NOT been saved.
zen 1.5.5.e any idea ?
Re: Backup MySQL Database
Quote:
Originally Posted by
Lopi
Hi, after install I have this problem
Result code: 1
0 => '"mysqldump"' is not recognized as an internal or external command,
1 => operable program or batch file.
Failure: The database has NOT been saved.
zen 1.5.5.e any idea ?
That suggests that the server doesn't have the mysqldump binary installed. Your hosting company may not have installed it.
Re: Backup MySQL Database
Quote:
Originally Posted by
idtags
I installed BACKUP_MYSQL Admin Tool Designed for: Zen Cart v1.3.x and 1.5.x series on my 1.5.5. Zen Cart.
Everything appears is working fine.
But I have 2 questions:
1. Admin->Tool menu shows sub menu "DataBase BACKUP_MYSQL" 2 times:
Attachment 17055
2. When I use both options
No Compression (Pure SQL) and
Use GZIP generating backup is compressed in both cases.
Is this issue of installation of web hosting server software?
Any suggestions are appreciated.
I've finally gotten around to again needing to get this to work on a particular host because I have some specific database testing to perform and after a good bit of review and minor modification I came across the above issue (which actually was the problem to begin with).
So here's thing and I'll address the above first:
Starting on line 209 of admin/backup_mysql.php:
Code:
switch ($_POST['compress'] && file_exists(DIR_FS_BACKUP . $backup_file)) {
case 'gzip':
@exec(LOCAL_EXE_GZIP . ' ' . DIR_FS_BACKUP . $backup_file);
if (file_exists(DIR_FS_BACKUP . $backup_file)) @exec('gzip ' . DIR_FS_BACKUP . $backup_file);
break;
case 'zip':
@exec(LOCAL_EXE_ZIP . ' -j ' . DIR_FS_BACKUP . $backup_file . '.zip ' . DIR_FS_BACKUP . $backup_file);
if (file_exists(DIR_FS_BACKUP . $backup_file) && file_exists(DIR_FS_BACKUP . $backup_file . 'zip')) unlink(DIR_FS_BACKUP . $backup_file);
}
The test to the right of the word switch: $_POST['compress'] && file_exists(DIR_FS_BACKUP . $backup_file) Well... by checking the radio button for "NOT" compressing (or to compress) well that results in the post to contain some text (even if it is the word no) and then that is && with the existence of the file which should basically be true at least when submitted through the admin screen interface. Well, the post of text that is not false && with a true condition evaluates to true. Then case 'gzip' is evaluated against a statement of true and since gzip isn't false or NULL it evaluates as true and the code within the case 'gzip' area is executed. During that execution (which is how I found the solution to my problems) the gzip function is attempted any number of ways. First by use of the software as identified in LOCAL_EXE_GZIP (defined in admin/includes/init_includes/init_gzip.php) and then basically if that doesn't work directly by use of gzip. What this also means though is that the 'zip' code never gets executed...
So I made the following changes in this area:
Code:
switch ($_POST['compress'] . (file_exists(DIR_FS_BACKUP . $backup_file) ? 'true' : '')) {
case 'notrue':
break;
case 'gziptrue':
@exec(LOCAL_EXE_GZIP . ' ' . DIR_FS_BACKUP . $backup_file);
if (file_exists(DIR_FS_BACKUP . $backup_file)) @exec('gzip ' . DIR_FS_BACKUP . $backup_file);
break;
case 'ziptrue':
@exec(LOCAL_EXE_ZIP . ' -j ' . DIR_FS_BACKUP . $backup_file . '.zip ' . DIR_FS_BACKUP . $backup_file);
if (file_exists(DIR_FS_BACKUP . $backup_file) && file_exists(DIR_FS_BACKUP . $backup_file . 'zip')) unlink(DIR_FS_BACKUP . $backup_file);
}
But... There's something about it all... There is just enough functionality in here to support a compressed backup, which could unfortunately also not be decompressed if several things do not line up correctly. I later found that I had to either modify the setting for LOCAL_EXE_GUNZIP to just be gunzip instead of some file path or modify the command for unzipping so that it referenced gunzip directly rather than with LOCAL_EXE_GUNZIP... Problem being that the decompressed file would get generated but have no content in it and because it exists that there was an attempt to restore the "nothing" which "succeeded" though made no changes.
Anyways, had the above "mistake" not existed, then I wouldn't have known that the system supported gzip (install seemed to indicate that it didn't exist, but when running the backup of this site, a file was successfully gziped even when the request was to not do so... Ie. a whole mess of confusion, but finally sorted out... Now though, if nothing else is done to attempt to override the compression, every backup would be non-compressed and still would not know that the system supported compression... Little bit of a round robin, no? Obviously a little additional checking here or there might make it easier/faster to resolve, but...
The above may or may not help someone, I don't really suggest making the changes in the base code without first incorporating some sort of additional testing/checking that gzip isn't an available option. I can safely make the above change(s) the the plugin's file, identify to the plugin to override compression, and modify the path to the compression/decompression programs and now have the option to export compressed or not, and can restore either a compressed or non-compressed file.
Total changes:
Above code changes.
in: admin/includes/extra_datafiles/backup_mysql.php
changed:
Code:
define('COMPRESS_OVERRIDE',false);
//define('COMPRESS_OVERRIDE',true);
to:
Code:
//define('COMPRESS_OVERRIDE',false);
define('COMPRESS_OVERRIDE',true);
in admin/includes/init_includes/init_gzip.php
changed:
Code:
define('LOCAL_EXE_GZIP', '/usr/bin/gzip');
define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip');
define('LOCAL_EXE_ZIP', '/usr/local/bin/zip');
define('LOCAL_EXE_UNZIP', '/usr/local/bin/unzip');
to:
Code:
define('LOCAL_EXE_GZIP', 'gzip');
define('LOCAL_EXE_GUNZIP', 'gunzip');
define('LOCAL_EXE_ZIP', 'zip');
define('LOCAL_EXE_UNZIP', 'unzip');
though the changes made above won't really make the zip option available for selection. That requires some other modifications for that option to be displayed.
Re: Backup MySQL Database
Quote:
Originally Posted by
idtags
2. When I use both options No Compression (Pure SQL) and Use GZIP generating backup is compressed in both cases.
Is this issue of installation of web hosting server software?
Any suggestions are appreciated.
The radio button does not work correctly when saving to the server, it only uses the defaulted radio button - gzip regardless of the selection.
Select 'Download without...' and the radio buttons work.
Re: Backup MySQL Database
The database went beyond 1MB and now this is the error when attempting to download the raw sql file:
*****
[10-Sep-2018 04:05:01 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14007287 bytes) in /home/hidden_name/public_html/shop/hidden_admin/backup_mysql.php on line 204
[10-Sep-2018 04:05:01 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
*****
Note: Current database size is 13MB.
Other Conditions:
GZip save to server - not affected as the file is compressed to 1.07 MB
GZip save to file - not affected as the file is compressed to 1.07 MB
No Compression (Pure SQL) - using download or save to server
- full screen error
- /logs myDEBUG-adm-x.log error posted
- On return to the database backup manager home the raw .sql file has been saved to the server
This behaviour needs some attention please.
Re: Backup MySQL Database
Hi Dr
Installed ok as per the instructions - goto the admin / database backup page and get this error:
ERROR: Your server's "exec()" command has been disabled. This script cannot run...
I can certainly do a manual mysql database backup by going to the cpanel on my hosting but through the admin page would obviously be a lot quicker:)
Any ideas?
Zen Cart 1.5.5f
PHP Version 7.2.10
Database: MySQL 10.0.36-MariaDB-cll-lve