How to turn on magento error messages?

tony09uk picture tony09uk · Jun 17, 2013 · Viewed 66.7k times · Source

I have installed Magento Community edition and tried creating my first simple hello world module. After a few hours I finally got it working.

My issues were I had used incorrect casing in some of the XML tags.

While trying to get it to work I tried to load the page a not found message was displayed, but no error.

I have switched errors on in the admin control panel System > Configuration > Developer > Log Settings and wrote a line which I know should have thrown an error but I just got a blank screen

  1. How do I get errors to display in Magento?
  2. Is it considered an error when I use incorrect casing in an xml file or is that an issue where I would not receive an error message? And if that is the case how would I quickly find the file that is causing the issue (obviously not a problem at the moment, but I can imagine as the module become functional it will be hard to find a single casing issue that is causing the problem)

Answer

Pankaj Pareek picture Pankaj Pareek · Jun 17, 2013

For enable error reporting

In Index page change the following:

error_reporting(E_ALL | E_STRICT);

to

error_reporting(E_ALL);

Set $_SERVER['MAGE_IS_DEVELOPER_MODE'] = true

and uncomment this line

#ini_set('display_errors', 1);

In Errors folder rename local.xml.sample to local.xml.

hope this help.