Free cookie consent management tool by TermsFeed Generator

General Help: Troubleshooting

Help for a specific addon is to be found on the product page (buttons for Installation Instructions and User Guide). This page is general help on digging into a problem to find out what's going wrong.

PHP Errors - Displaying and Logging

You can control the display and logging of php errors in your config files. On the admin side, you’ll need to access and edit the file:

[catalog]/[admin]/includes/configure.php

Where [catalog] is the folder that your shop is in and [admin] is the name of your admin folder.

 

You can add commands near the top of the file, after the line with <?php

You can display errors (I don’t recommend doing this in the catalog side of the shop, just admin) by adding

 ini_set('display_errors', 1);

 

You can write errors to the error log file by adding

 ini_set('log_errors', 1);

 

You can set the name and location of the log file by adding

 ini_set('error_log', ‘php-errors-adm-' . date('Y-m-d') . '.log');

this writes errors to a file with name like php-errors-adm-2024-06-18.log in your admin folder, and starts a new file every day

DO NOT change the location of the log file to a publicly accessible folder (i.e. one inside your shop) as it presents a serious security flaw.

Increasingly, web hosts are disabling the ability to override the location of the php error log file, so if your changes make no difference that's probably the case for you.

In the admin example above, the top of the file now looks like

<?php

 ini_set('display_errors', 1);

 ini_set('log_errors', 1);

 ini_set('error_log', ‘php-errors-adm-' . date('Y-m-d') . '.log');

 error_reporting(E_ALL);