Fixing a Drupal PHP deployment issue

Symptoms:

When deploying a Drupal site into production, cryptic error messages appear on the screen, and some content/styles/etc. will not display properly. Yet, some content is shown (so it is connecting to the database) and the admin area can be accessed.

Cause:

If the development server uses PHP4, the “Date PHP4″ module which emulates a function built into PHP 5 is required. When the Drupal installation is then deployed to a server with PHP 5 with this still enabled, the site breaks.

Solution:

Disable the Date PHP4 module in the modules admin page (http://www.example.com/admin/build/modules or by browsing Administer -> Site building -> modules) in the “Date/Time” section.

Prevention:

Apply above solution before exporting the database for deployment.