Upgrade PHP on Debian 6 Squeeze to support Drupal 8

Drupal administrators who are running servers with Debian 6 Squeeze who want to try out Drupal 8 will face a big problem: Debian 6 still uses PHP version 5.3.3 whereas Drupal 8 requires at least PHP 5.3.10. This page shows how you can easily upgrade your PHP version to the latest 5.3 release.

I just read on Dries Buytaert's blog about the code freeze of Drupal 8, so I wanted to try it out. However, after unpacking Drupal 8, I immediately got the following message in my browser:
Your PHP installation is too old. Drupal requires at least PHP 5.3.10. See the system requirements page for more information.
My development server was indeed running Debian 6 Squeeze which still comes with PHP 5.3.3. Since upgrading to another version of Debian was not an option and since I didn't want to manually install and maintain PHP, I went looking for a different solution.

I quickly found the website of dotdeb.org. Dotdeb is a repository containing packages to turn your Debian boxes into powerful, stable and up-to-date LAMP servers. By using their repository, you can update you PHP version so that you can run Drupal 8.

I did the following:

  1. Open /etc/apt/sources.list and add the following:
    deb http://php53.dotdeb.org squeeze all
    deb-src http://php53.dotdeb.org squeeze all
  2. Download their PGP key and add it to the list of trusted PGP keys:
    $ wget http://www.dotdeb.org/dotdeb.gpg
    $ cat dotdeb.gpg | sudo apt-key add -
  3. Update your repository list and upgrade PHP:
    $ sudo apt-get update
    $ sudo apt-get dist-upgrade
  4. The upgrade also upgraded the mysql-common package on my server. This required me to also perform an upgrade of mysql-server:
    $ sudo apt-get install mysql-server
  5. Three simple actions and your PHP version will be up-to-date so that you can install Drupal 8!


You might also be interested in...