Hetzners upgrade to PHP 5.4 - what are you doing with Drupal 6 sites?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
inky@inky3d.com's picture

Hi folks

For anyone who has a site hosted with Hetzner (the SA version at least) you'll know that they are about to upgrade to PHP 5.4 in September.

I've successfully upgraded all the modules on D7 sites that work happily with PHP 5.4, but not so lucky with D6 sites. The issue lies within Views - both 2x and 3x. Obviously because everyone is spending more energy on D7 modules, this is not being resolved very fast.

I am considering telling my clients, that in order to have a functioning website come end Sept 2013, they either need to move hosting or upgrade to D7.

Anyone else bumping into this at the moment? What solutions have you found?

Comments

Disable Messages module

foxtrotcharlie's picture

Hi Inky :-)

The views errors I've encountered have been 'strict' errors, and can be hidden using the "Disable messages" module. Presumably this shouldn't have an impact on the functionality of the site because "STRICT messages provide suggestions that can help ensure the best interoperability and forward compatibility of your code. ". See http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-repor...

So, what I'd do is send every D6 client an email telling them the reasons why it's important to keep up to date with the current version of Drupal, and that you recommend upgrading to D7. For those that don't have the budget, warn them that while the site should still function correctly after the PHP switch, there may be issues which could necessitate a switch to a new hosting provider, but perhaps these can be addressed on a site by site basis when and if they appear...

Bottom line is that Drupal 6 is going to become unsupported, so eventually they'll have to upgrade, or change their platform or risk running a site which becomes a security risk. But if you've at least advised them on their options, the onus is on them, not you...

Disable Messages module

foxtrotcharlie's picture

Hi Inky :-)

The views errors I've encountered have been 'strict' errors, and can be hidden using the "Disable messages" module. Presumably this shouldn't have an impact on the functionality of the site because "STRICT messages provide suggestions that can help ensure the best interoperability and forward compatibility of your code. ". See http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-repor...

So, what I'd do is send every D6 client an email telling them the reasons why it's important to keep up to date with the current version of Drupal, and that you recommend upgrading to D7. For those that don't have the budget, warn them that while the site should still function correctly after the PHP switch, there may be issues which could necessitate a switch to a new hosting provider, but perhaps these can be addressed on a site by site basis when and if they appear...

Bottom line is that Drupal 6 is going to become unsupported, so eventually they'll have to upgrade, or change their platform or risk running a site which becomes a security risk. But if you've at least advised them on their options, the onus is on them, not you...

Hey Charlie Yeah, am

inky@inky3d.com's picture

Hey Charlie

Yeah, am explaining the virtues of upgrading to D7... :)

Had a look at the Disable Messages module, but not sure if that will help. With PHP 5.4 enabled, it's not just that messages appear, the views don't work at all, leaving large blank areas where content should be :(

PHP 5.2 to 5.3 to 5.4

NaX's picture

Hi All

We host and manage a number of Drupal websites and have also been working on upgrading.

The 5.3 upgrade was big for us and a lot of work but, could mostly be solved by upgrading modules and Drupal core to the latest dev versions at the time.

It looks like the 5.4 upgrade we are being forced to reply on patching to solve these problems.

Below are a list of links to a few of the major patches we are looking at. The first link fixed most of the warnings we were having including views warnings and notices. Fixing causing of the errors in views does not seem to be an option.

Patch Error reporting
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665841
Our version of the patch.

--- a/includes/common.inc
+++ b/includes/common.inc
@@ -665,7 +665,11 @@ function drupal_error_handler($errno, $message, $filename, $line, $context) {
     return;
   }

-  if ($errno & (E_ALL ^ E_DEPRECATED)) {
+  $error_const = E_ALL ^ E_DEPRECATED ^ E_NOTICE ^ E_STRICT;
+  if (version_compare(phpversion(), '5.4.0') < 0) {
+    $error_const = E_ALL ^ E_DEPRECATED ^ E_NOTICE;
+  }
+  if ($errno & $error_const) {
     $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning', 4096 => 'recoverable fatal error');

     // For database errors, we want the line number/file name of the place that

Patch Drupal Core Block module
https://drupal.org/node/1680614#comment-7198920

Patch Date Module
https://drupal.org/node/1808416#comment-7208980

Patch Draggable views module
http://drupal.org/node/1774764#comment-7206446

Patch Taxonomy module
https://drupal.org/node/996124

I hope that helps

Switched to Hetzner TruServ Servers

Riaan Burger's picture

We recently changed all our servers to Hetzner TruServ servers in SA and EX servers in Germany. Half way through the migration Hetzner did their PHP 5.3 to 5.4 update and a few sites bombed for an hour before we switched them back to PHP 5.3. They mentioned that they will be removing PHP 5.3 support completely come end October. So we prioritized learning to run more than one PHP FPM version on the new root servers and moved the last few sites over.

If you have a few hold-out sites that require PHP 5.3 and doesn't use an enormous amount of resources we will host them for you for free until about mid-next year. We only have SSH and git on our servers (no FTP) and only for internal staff though, so we'll have to upload and set up for you.

One reason we will be doing this is that many of these clients will be much better served moving from D6 straight to D8, so a few extra months will help them a lot.

Hi Riaan I might need to take

inky@inky3d.com's picture

Hi Riaan

I might need to take you up on that offer. Will let you know soonest.

PHP 5.3

Riaan Burger's picture

Hey inky3d,

Sure thing on the PHP 5.3 sites. Let me know.

My direct e-mail address is riaan.burger@burtronix.com and you can phone me on 082 657 6005.

Cheers,
Riaan

Room without Views

Simon Naude's picture

Probably the best solution (at least the one the company I work for has gone with) is replacing views by writing custom code to replace the view instances we created in the past (id est, any pages that were instances of views have been recoded as part of custom modules), thus removing the need to use views.

I'm also facing a separate, unrelated issue that I can't seem to find a solution for : Using the hunchbaque theme, it's theme_preprocess_page($vars) implementation is not creating the $body_attributes variable properly (it doesn't get entered into the body tag).

Edit : The solution is to change theme_preprocess_page($vars) to theme_preprocess_page(&$vars)