My 2 paisas

How to enable error reporting in drupal

Posted on: October 29, 2009

Enable Error Reporting

Although it may be turned off on commercial hosts and production sites (for good reason, so that users do not see the errors), these errors are one of your best tools for troubleshooting. To enable error reporting, temporarily edit your index.php file (normally located in your root directory) directly after the first opening PHP tag (do not edit the actual file info!) to add the following:


ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

// $Id: index.php,v 1.94 2007/12/26...

You will now be able to see any errors that are occurring directly on the screen. Memory problems may still not be displayed, but it’s the first step in a process of elimination.

If you are using a multi-site setup and only want errors to appear for one site, then check the name of the host first as in:


2 Responses to "How to enable error reporting in drupal"

Thanks a lot! Very simple but I forgot it and found it here. This is also helpfully to develop Themes in Drupal 7. Simply paste these lines at the beginnig of the template file (template/page.tpl.php, node.tpl.php)

[…] How to enable error reporting in drupal October 2009 1 comment 4 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Links that I liked to save

Blog Stats

  • 44,958 hits
%d bloggers like this: