Recently I had a Zen Cart store showing a completely blank page during the checkout process. With the default settings we were unable to find out what the issue was so we needed to figure out a way for more debugging. To easily accomplish a verbose debug log of each action on the site you can download a Zen Cart add-on called “Debug Error Logging Utility”. This add-on will provide details of each page processed on the site or for the administration section. Follow the directions below to enable more logging.
- Download Debug Error Logging Utility: Visit the following URL in a browser to download the Debug Error Logging Utility: Download Here
- Install Debug Error Logging Utility:Unpack the add-on you have downloaded from the Zen Cart web site. Upload the enable_error_logging.php file to zencart-root/includes/extra-configures/ to debug the front end of the site or upload the file to zencart-root/admin/includes/extra-configures/ to debug the admin portion of your site.
- Verify Permissions: Make sure that your stores cache directory has the proper permissions for the web server to write the debug logs to it. The cache directory will be in the root directory of your store.
- View Debug Log: A debug log will be created for each page that is visited on your site when the enable_error_logging.php file is in the extra_configures directory. The log will be named myDEBUG followed by the date and time. Below is an example of the cache directory with a couple of the myDEBUG files located in it.
-rw-rw-rw- 1 apache apache 178 Mar 21 13:26 myDEBUG-1237656362.log -rw-rw-rw- 1 apache apache 178 Mar 21 13:26 myDEBUG-1237656378.log -rw-rw-rw- 1 apache apache 177 Mar 21 13:26 myDEBUG-1237656392.log -rw-rw-rw- 1 apache apache 177 Mar 21 13:26 myDEBUG-1237656393.log -rw-rw-rw- 1 apache apache 178 Mar 21 13:26 myDEBUG-1237656394.log -rw-rw-rw- 1 apache apache 178 Mar 21 13:26 myDEBUG-1237656406.log -rw-rw-rw- 1 apache apache 177 Mar 21 13:27 myDEBUG-1237656428.log -rw-rw-rw- 1 apache apache 178 Mar 21 13:27 myDEBUG-1237656430.log -rw-rw-rw- 1 apache apache 178 Mar 21 13:28 myDEBUG-1237656488.log -rw-rw-rw- 1 apache apache 177 Mar 21 13:28 myDEBUG-1237656514.log
The debug log should provide enough information to locate the error that is causing the blank page to show up in your Zen Cart store.
- Turn Logging Off:Turn off logging by renaming the file with a different extension other than PHP such as .bak. Once you have turned off logging remove or move the myDEBUG files from the cache directory to clean things up.
Without the Debug Error Logging Utility it can be difficult to troubleshoot these error with Zen Cart so I was really thankful for this add-on.Tags: add-on, debug, debug error logging utility, error, log, logging, PHP, zen cart, ZenCart