I've just migrated a site using the Date module from a server running PHP 5.2 to one running PHP 5.1. This resulted in a permanent WSOD for the entire site and the following error in the log:

PHP Fatal error: Call to undefined function timezone_open() in /var/www/html/sites/all/modules/date/date_api.module on line 571

Of note is the fact that this changeover worked fine when I was using a previous RC of Date, though I don't recall exactly which one it was.

Comments

karens’s picture

Status: Active » Fixed

PHP 5.1 requires the PHP4 module, as does any version earlier than PHP 5.2 (I know it's a misnomer, but didn't have a better name for it). If you disabled the Date module before switching from one PHP version to the other then tried to re-enable it, it would have automatically detected that you needed that module and enabled it. But just moving things over without disabling/enabling gets you to a setup that is missing that module.

It probably worked OK earlier because I had automatic enabling going on in several places, but I had to turn some of that off because it made it impossible to disable things when you really wanted to do it. I've run out of other ideas to get that to turn on automatically other than through the disable/enable process.

I think if you go back and disable the Date API modules before you migrate, then re-enable them (being sure to enable the PHP4 module), things will work fine.

Grantovich’s picture

Oops! I forgot that pre-5.2 PHP support was in a separate module. Fixed the white screen by manually disabling the Date modules in the database, and re-enabling them from Drupal. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.