Errors are the oldest form of error handling in PHP dating all the way back to PHP 3. Trigger_error is still useful in certain very limited circumstances owing to the fact that, unlike exceptions, errors cannot be caught or if they don't stop the system then code continues on the line following trigger_error. Drupal primarily makes use of Exceptions and assertions, using errors only when necessary to cause an immediate halt of the system.

Faults: Assertions, Errors, and Exceptions

(API still in development)

Sooner or later problems occur in all computer programs. There are three problem groups in PHP

Troubleshooting overview

  1. Stop and think
    • Have you made any recent changes to your site such as:
      • installing new modules?
      • updating existing modules?
      • making configuration changes?
      • granting or revoking permissions?
    • Does the version of the module you installed match your version of Drupal? For example, Views for Drupal 7 will not work on a Drupal 6 site.
  2. Read the error messages. Depending on how you have set your error messages to display, Drupal-specific error messages may display on the page. When the core dblog module is enabled, you can find error reports at /admin/reports/dblog. When debugging, you should also check non-Drupal logs, such as Apache, PHP, etc. Your hosting provider can help you locate these logs.

    Errors may include:

  3. Validate your page

Backup your database and files

Website backups are more than just an element of best practices, they are essential!

If for any reason your website goes awry the option of restoring it from a recent backup is often the best solution, and sometimes it is the only one available. To create a complete backup the database and the custom files will both need to be backed up. An automatic backup strategy is easy to implement using the Backup & Migrate module, and a manual backup can be created before major updates or new implementations, providing a convenient restore point taken immediately prior to the changes going in.

Backup & Migrate

The Backup & Migrate module facilitates emergency recovery and site migration. You can configure it for automatic backups saved to the filesystem - with more frequent backups during development.

You can also create a manual backup before undertaking any complex configuration. That way, you have a "restore point" in case of disaster.

While there may be some issues of security when you save the database and content as a file (you could exclude certain tables, perhaps), the benefits of having a rollback in case of disaster are significant.


If you're having a problem with your Drupal site, you're almost certainly not alone. Your questions may already have been asked and answered many times. Save yourself some time and start with this guide before you post an issue in the queue.

If you don't find your answer here, you can:

Subscribe with RSS Subscribe to RSS - errors