That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
I am receiving the following in error logs after installing Backup MySQL Database plugin v157?
Do you have any idea what is causing the error?
[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant ICON_FILE_DOWNLOAD - assumed 'ICON_FILE_DOWNLOAD' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 439.
[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant IMAGE_RESTORE - assumed 'IMAGE_RESTORE' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 461.
[19-Jul-2020 09:29:25 CST6CDT] Request URI: /shop_v157/my_admin_dir/index.php?cmd=backup_mysql&action=backup, IP address: 69.137.114.242
#1 require(/home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php) called at [/home/tennes60/public_html/shop_v157/my_admin_dir/index.php:11]
--> PHP Warning: Use of undefined constant IMAGE_BACKUP - assumed 'IMAGE_BACKUP' (this will throw an Error in a future version of PHP) in /home/tennes60/public_html/shop_v157/my_admin_dir/backup_mysql.php on line 500.
You can probably add this to the bottom of the plugin's language file to stop those warnings:
Code:if (!defined('ICON_FILE_DOWNLOAD')) define('ICON_FILE_DOWNLOAD', 'Download'); if (!defined('IMAGE_RESTORE')) define('IMAGE_RESTORE', 'Restore'); if (!defined('IMAGE_BACKUP')) define('IMAGE_BACKUP', 'Backup');
.
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.
What is the purpose of these errors and future errors warning?
It's part of PHP's evolution. The PHP authors have been taking steps over the past few years to improve performance. Apparently the undefined-constants' checking at runtime was determined to be a bottle-neck.
Those messages are PHP's notice that an undefined constant was found and, for now, it's going to be interpreted as if the code had placed quotes around the constant name. Future versions of PHP will stop during the parsing step and issue an error if an undefined constant is discovered.