Updating PHP5.2 to PHP5.3 using apt-get

How you can go about upgrading PHP to 5.3 from 5.2 - a guide

There are already a couple of guides online already about this, but none of them seemed complete or at least I had to do some extra digging to solve things perhaps unique to my setup.

Here is what I have done to update PHP5.2 to PHP5.3 using apt-get;

You will need to execute the following commands as root or sudo them.

  • Back everything up.
  • Make sure everything is backed up (seriously).
  • Add some lines to your sources list vi /etc/apt/sources.list
  # php5.3

  deb http://php53.dotdeb.org oldstable all
  deb-src http://php53.dotdeb.org oldstable all
  • Request some public keys
  gpg --keyserver keys.gnupg.net --recv-key 89DF5277
  gpg -a --export 89DF5277 | sudo apt-key add -
  • Update your system
  apt-get update
  apt-get dist-upgrade
  • (optional, I had to do this for my GD library) update php5-gd apt-get -f install php5-gd

  • Test your sites.
  • Take a new backup with your new setup.

Recent posts View all

Productivity

5 ways to speed up your software development

I love feeling like I am speeding through development tasks, here are five things that can help speed up your software development

Accessibility SEO

The main reasons why we shouldn't use click here as link text

There are many reasons why we shouldn't use click here or similar as link text, let's go through them