Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

Zen Cart Logs

Since Zen Cart 1.5.0, the Zen Cart software has created its error logs in the folder /logs. Files have a filename that starts with myDEBUG- (or myDEBUG-adm- for logs created by the admin system. After this, the filename is composed of a date and time string so you can tell when the log was created.

Some logs are Warnings. A warning does not affect the operation of the cart, it just shows where a minor coding error occurred. Here's an example of a warning:

PHP Warning: Use of undefined constant IH_VERSION_TEXT - assumed 'IH_VERSION_TEXT' (this will throw an Error in a future version of PHP) in  on line 58.
Other logs are Errors, which means the page failed to completely render because of the error. If this happened early on in the process of building the page, part or all of the screen could be blank (see also my Blank Page guide.) Here's an example of an error:

[07-Mar-2020 02:00:05 America/New_York] PHP Fatal error:  Cannot declare class order, because the name is already in use in includes/classes/order.php on line 1156

My logs folder is empty!

There are a couple of other possibilities:

a) It could be that your logs are going into a file called error_log. Look for a file of this name at the top level of your cart (where the email directory resides). Here's an example of what a log in the error log looks like:

[28-Feb-2020 09:35:00 UTC] PHP Fatal error:  require_once(): Failed opening required 'DIR_WS_INCLUDESapplication_top.php' (include_path='/home/user/public_html/:.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/user/public_html/ajax/ajax_search.php on line 5
b) If you are running PHP-FPM in certain configurations (often associated with shared hosting), the log handling is quite different. You will have to talk with your hoster to get specifics, but generally what happens is that rather than using the /logs folder and writing out one file at a time, what happens is that all log data is appended to a file whose name is something like /home/YOUR_ACCOUNT/logs/YOUR_ACCOUNT_com.php.error.log.

The hosters that I am aware of that operate in this mode are GeekHost and InMotion but there may be others.

Logs for this configuration look just like entries in error_log described above.