Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn on magento error messages?

Tags:

magento

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)
like image 752
tony09uk Avatar asked Sep 10 '25 10:09

tony09uk


2 Answers

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.

like image 126
Pankaj Pareek Avatar answered Sep 13 '25 13:09

Pankaj Pareek


to complete the pankaj post, this work for me index.php

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

$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
like image 41
masoud2011 Avatar answered Sep 13 '25 13:09

masoud2011