Submitted by chrishu on Sun, 03/02/2014 - 19:03

Move with the times

Although this site does not run the latest Drupal 8 I am testing a dev. site on the server to start getting ready for migration to the first beta release. Recently Drupal 8 became dependent on PHP 5.4 as apposed to 5.3.

Some Linux distros are already on at least PHP 5.4 however the latest Ubuntu with long term support (which you are going to need in a production environment) is running PHP 5.3. Fortunately it is easy to upgrade the following should do it:

sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable 
sudo apt-get update
sudo apt-get install php5

You may need to re-start your webserver software, it will probably have happened automatically and told you though.

Note: The strange looking install of python-software-properties just provides the useful add-apt-repository functionality. PPA (personal package archive) repositories were originally an Ubuntu mechanism to provide Ubuntu devs with access to newer versions of additional software that wasn't available in the main repository, they are now open for general use where needed. Be aware however you are going slightly off of the beaten path and need to be cautious, having said that if you are using Drupal 8 on a public server right now you are already off of the beaten path and should already be careful.

There was a lot of debate about making Drupal 8 dependant on PHP 5.4 it seems. Apart from the concerns that it could prevent the use of Drupal 8 on some shared hosting, and require and update on some Linux server distros, I believe it was a good move. For one thing PHP 5.4 does seem to have sped up the page loads noticeable on this site.

Apparently the main desirable difference in PHP 5.4 was traits. I haven't looked yet to see if any have made it into the Core code yet, but I will be interested to investigate where they are used at some stage.