Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How we enable Magento error reporting & fix errors

by | May 31, 2019

Websites show unexpected errors that make visitors panic.

Magento error reporting is a troubleshooting technique. It displays the error message on the Magento panel when something goes wrong.

Also, some Magento applications write error logs in preset location. For error reporting to work properly, we need to turn on log write to record logs.

At Bobcares, we often get requests from our customers to resolve Magento error reporting as part of our Server Management Services.

Today, we’ll see how our Support Engineers fix the Magento errors.

 

Enable error logging in Magento

First of all, we need to tweak the log settings to turn ON Magento error reporting.

Fortunately, in Magento 2.x, error logging is enabled by default, and requires no special configuration.

But, in Magento 1.x,  we need to turn on log write, so the system starts recording logs.

Go to Magento Admin > Configuration > Advanced > Developer > Log setting & enable log settings.

 

How we set up Magento error reporting

In general, Magento errors can result in a blank page or error number like “Error log record number: 774937658839″.  Unfortunately, the exact reason for the error will be unknown. In such cases, while troubleshooting, our Support Engineers enable error reporting in Magento files by executing the steps below.

1. Initially, we connect to the server as a root user and access the user account. Or, if you have only user access you can use a file manager or FTP.

2. Then, we open the errors directory & rename local.xml.sample file to local.xml.

3. Next, open index.php file & we add the following code at the end of the file.

error_reporting(E_ALL);
ini_set('display_errors', 1);

4. After we save the file, refresh the site home page to preview errors.

That’s how we report the error message in Magento.

 

How we troubleshoot problems with error reporting

Even after enabling error reporting, we often see customers reporting problems with it.

Let’s see how our Support Engineers solved the problem.

 

1. Wrong settings in the index.php file

In most cases, when there are incorrect settings in the index.php file, Magento website doesn’t display the error message on the browser.

Therefore, to solve this problem we took the following steps.

1. First, we disabled Cache Management by navigating to System > Cache Management > Select All [check-boxes] > Actions = Disable > Submit.

2. Next, we disabled compilation by selecting System > Tools > Compilation > Disable.

[Note:– Because before enabling error messages it is necessary to disable caching & compilation.]

3. Finally, we opened the index.php file under Magento root directory & added the following line at the beginning.

$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true

That fixed the problem & the user could display the error message in Magento website.

 

2. Permission issue

Recently, one of our customers had an issue regarding the error report in Magento. After migration, Magento was not writing logs in /var/report .

Usually, this problem occurs when there is no write permission in /var/report folder.

Therefore, to solve this permission problem, we corrected and added write permission on the corresponding folder.

That fixed the problem and the user could see Magento writing logs in the folder /var/report.

[Having trouble with Magento error reporting? We’ll fix it for you.]

 

Conclusion

In short, Magento error reporting is a good method to troubleshoot website errors. It gives a clear picture on the exact cause of error. Today, we saw how our Support Engineers enabled error reporting in Magento and fixed related errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Reviews

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF