Monday, June 14, 2010

Debugging Magento

Magento some times errors out with the below message which gives no clue as to what might have gone wrong:

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

If you have access to the files on the server, then go to the folder /var/report/ and look for the file named with the above number and open it up - you will see a "stack trace" of the error!

In case you do not have access to these files, fear not! You can enable the printing of the logs on the front-end. Open the file index.php and uncomment line 71 to display the errors:

ini_set('display_errors', 1);

But remember - do not keep this on for a long time as the error messages will be visible to the world.

No comments:

LinkWithin

Related Posts Plugin for WordPress, Blogger...