There are some problems with running Drupal on php 5.3. There are five kinds of solutions:
Module | Patch | Issue Queue |
---|---|---|
imageapi | imageapi_540486.patch | http://drupal.org/node/540486 |
calendar | calendar-6.x-2.2-613528-5.patch | http://drupal.org/node/613528 |
date | date-6.x-2.x-549884-30.patch | http://drupal.org/node/549884 |
views | views-6.x-2.7-php53-1.patch | http://drupal.org/node/452384 |
admin_menu | 615058-adminmenu-php53-D6-1.patch | http://drupal.org/node/615058 |
rules | rules_php53fixes2.patch | http://drupal.org/node/703294 |
Any error that looks like: unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING
that references a .ini file can be fixed by putting quotes around the description in that file to comply with php syntax rules for .ini files.
Explicitly set the timezone in php.ini by uncommenting the line that contains date.timezone and adding a zone. e.g.:
date.timezone = America/Toronto
See: http://funkinetics.org/klink/function-ereg-is-deprecated-error-in-drupal...
However, if you prefer to keep PHP 5.3, you can always suppress the deprecated function errors. In Drupal’s
includes/common.inc
, find line 590. It should be listed as:
if ($errno & (E_ALL ^ E_NOTICE)) {
Replace this line with:
if ($errno & (E_ALL & ~E_NOTICE & ~E_DEPRECATED)) {
This will now always suppress the Deprecated error messages. If you have the developer tools module, you’ll need to make the same change to
devel/devel.module
line 460.Note: Every time you update Drupal or the Devel module you’ll have to manually make this change until they finally both support php 5.3.
Here is the patch that was done on Drupal 6: http://drupal.org/node/360605#comment-2047768
Here is my big patch to fix everything: http://drupal.org/node/360605#comment-2273386
Other things that will need to be done in contrib:
Quotes around the description in many of the .info files including the following:
image/contrib/image_gallery/image_gallery.info
image/contrib/image_import/image_import.info
tapir/tapir.info
ubercart/uc_roles/uc_roles.info
ubercart/shipping/uc_weightquote/uc_weightquote.info
gmap/gmap_location.info
zenzen/zenzen.info
zen_basic/zen_basic.info
image/contrib/image_import/image_import.info
I have posted a patch on menu.inc here: http://drupal.org/node/744764#comment-2883022
views_rss.module needs a patch to views_rss_views_feed_argument so that the second argument is not a reference
Also Google Analytics has a line that need replacing:
-$p = module_invoke('profile', 'load_profile', $user);
+$p = call_user_func('profile_load_profile', $user);
This comment: http://drupal.org/node/514334#comment-1963440 suggests replacing ereg() with mb_ereg()
However, the official replacement is: preg_match() see: http://www.php.net/manual/en/migration53.deprecated.php
Here is some discussion on patching Drupal: http://drupal.org/node/64967
This solution would probably need a lot of work, and maintenance re-applying patches for each update of Drupal