- Drupal 6.19
- PHP 5.1.6
- PostgreSQL 8.1
- centOS 5
Having upgraded from Drupal 5.20 it's taken weeks to track down and fix an event/calendar problem which appears to be all down to the version of PHP. Unfortunately this cannot be upgraded because the production website is on a managed server. Many replies to comments have said upgrade to PHP 5.2 to which many have replied it's not an option - same reason as me. Have also spoken to web host, but there's no plan to upgrade their RHEL5 in the immediate future.
But tonight... bingo!
I am requesting that the date_api module be modified to check which version of PHP is being used.
Line: 655 > 657 in date_api.module
# if (get_Class($date) != 'DateTime') {
# $date = new DateTime($date);
# }
Be updated with ...
if (phpversion() >= 5.2 && get_Class($date) != 'DateTime') {
$date = new DateTime($date);
}
This will hopefully resolve many of those struggling to find a fix with the white screen of death that you may see. Checking the error logs revealed:
PHP Fatal error: Call to undefined function date_format() in date_api
The source for this fix was buried down a thread at http://drupal.org/node/882980
And the credit all goes to #24 Posted by Durrok on August 23, 2010 at 6:50pm
Hope this helps save others weeks of tearing their hair out with the same installation set up I have to use ;-)
Comments
Comment #1
karens commentedDuplicate of #882980: WSOD with PHP versions 4.x, 5.0, & 5.1 when the Date_PHP4 module is enabled.