Search This Blog

May 13, 2012

Magento: How to show exception error

Magento is not showing exception error for the purpose of security. All you can see on the page if there’s an exception error is :

There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 330339875666

You can access the error file containing the error then on this directory /var/report

I’m favor to this functionality to avoid security issues but it will cost you a lot of time especially when you are debugging serious in your site. Instead of downloading and opening the file it would be better to display the error on the page and then turn it off after you fixed it.

Ok, so the simple solution on this is to do the following:

1. go to your magento installation directory and go to /error folder.
2. Then, rename the file "local.xml.sample" to "local.xml" to show the error. It will print the error on the page and you can easily see the error for debugging.
3. To turn it off, just rename the file back to local.xml.sample and you're done.:))

Always remember, be cautious in doing things like this, especially when it involves security to avoid serious headache.:))