Report All Errors (Even Warnings) for Zen Cart v1.5.1 through v1.5.5

Version 2.0.1 by lat9

Copyright © 2013-2016 Vinos de Frutas Tropicales. All rights reserved.


Current Support Thread at Zen Cart Forums: http://www.zen-cart.com/showthread.php?211217-Support-Thread-Report-All-Errors-%28Even-Warnings%29

This plugin provides an easy way for developers to control the logging of all PHP-related errors to a myDEBUG*.log file. After you've installed the plugin, there are two new values in your admin's Configuration->Logging:

  1. Report All Errors (Admin)?. Set this value to Yes to enable all PHP errors to be reported for admin-related pages. Use the IgnoreDups setting to cause the processing to not log the duplicate-constant messages described below.
  2. Report All Errors (Store)?. Set this value to Yes to enable all PHP errors to be reported for store-related pages. Use the IgnoreDups setting to cause the processing to not log the duplicate-constant messages described below.

Notes:

  1. Use caution when enabling this plugin on a live store as your store's performance will most likely be significantly reduced!
  2. The store-side debug-log files can be very large, so make sure that you clean them out periodically.

The first time you enable the reporting of all errors on your store you might see a number of items similar to

PHP Notice:  Constant SOME_LANGUAGE_CONSTANT_NAME already defined in {DIR_FS_CATALOG}\includes\languages\english.php on line xxx

These "notice" messages are issued if your store has made a template-override change to the default language file (for this example, english.php). That's because Zen Cart first loads your template-override language file and then — because sometimes new messages are introduced with a new Zen Cart version — loads the default language file. These notices can be safely ignored; you can use the plugin's IgnoreDups setting to cause these notifications to not be logged.

This section identifies the procedure you'll use to install/update or remove the plugin for your Zen Cart.

There are two core-file overwrite in this plugin; you should always backup your cart's database and files prior to making any changes.

  1. Rename the YOUR_ADMIN folder to match your store's "secret" admin-folder name.
  2. Copy the plugin's files to your store's file-system:
    1. /includes/auto_loaders/config.report_all_errors.php
    2. /includes/auto_loaders/paypal_ipn.report_all_errors.php
    3. /includes/extra_configures/enable_error_logging.php
    4. /includes/init_includes/init_report_all_errors.php
    5. /YOUR_ADMIN/includes/auto_loaders/config.report_all_errors_admin.php
    6. /YOUR_ADMIN/includes/extra_configures/enable_error_logging.php
    7. /YOUR_ADMIN/includes/init_includes/init_report_all_errors_admin.php
  3. Log into your Zen Cart admin. The plugin's auto-installer will run, creating new settings in Configuration->Logging.

The plugin's undergone some re-construction starting in v2.0.0, adding an additional configuration setting. The easiest way to upgrade to v2.x.x from 1.x.x is to run the plugin's SQL uninstall script and then follow the installation instructions.

First, delete the files that were copied to your Zen Cart installation's file-system, restoring any core-file overrides that might have been necessary. Then use your admin's Tools->Run SQL Patches to run the file /docs/report_all_errors/uninstall/report_all_errors_uninstall.sql.

  • v2.0.1, 2016-08-29
    • BUGFIX: Correct auto-installer SQL error.
  • v2.0.0, 2016-08-28
    • CHANGE: Move stand-alone SQL install script into an admin-level auto-installer.
    • CHANGE: Add configuration settings to allow the duplicate-constants PHP notifications to be ignored.
  • v1.1.2, 2015-12-30
    • Updated the two core-files modified by this plugin to use the downward-compatible versions provided by Zen Cart v1.5.5.
  • v1.1.1, 2014-05-17
    • Added notes to this readme file, indicating that some of the PHP notifications/warnings are to be expected (based on the Zen Cart architecture)!
    • Updated the readme to identify that the plugin is compatible with Zen Cart v1.5.3.
  • v1.1.0, 2013-12-06
    • Modified method used to enable — was via $_GET variable, now via admin-configurable switches.
    • v1.0.0, 2013-12-03, Initial release.