Show all errors while developing

Set Drupal to show all errors when developing your module.

Some errors are only reported when all PHP error reporting is switched on. Without the error reporting on, you get the dreaded White Screen of Death.

Change settings in your dev site

You can show all errors by adding a few lines to your local testing site's settings.php:

Specify 403 and 404 error pages

Drupal's page error messages are meant to be direct and to the point. If you want page error messages that are a little more user-friendly, Drupal allows you to customize them.

  1. Create two nodes, one for each kind of page error (403 and 404).
  2. Determine the ID number of the node you wish to redirect users to. One way to determine the node's ID number is to visit the node and look at the number after the last slash in your browser's address bar. This is your node's ID number.
  3. Now enter the paths to your nodes in the appropriate boxes on your error reporting settings page. For example, if the node ID number for 403 error codes is "83," you would type "node/83" into the "Default 403 (access denied) page" setting.
    • Drupal 6
    • Drupal 7

Because you are creating nodes, they will show up in the tracker and popular content blocks and anywhere else real nodes would be display. If this isn't acceptable, there is a contributed module called Custom Error that avoids this problem.

Subscribe with RSS Subscribe to RSS - error_reporting