MAC OS X, Linux, Windows and other IT Tips and Tricks

24 Oct 16 Upgrading php from 5.4 to 5.6 in Debian Wheezy

In order to upgrade PHP from 5.4 to 5.6 we need to use the DOTDEB repositories by which many other packages will also be upgraded. Here are the steps.

Edit the file /etc/apt/sources.lst and add the following lines:
deb // wheezy all
deb-src // wheezy all
deb // wheezy-php56-zts all
deb-src // wheezy-php56-zts all

Then run the following commands:
Note: Because of a bug in these package’s after-install I added some extra commands that will take care of it:
mkdir -p /etc/apache2/conf-available/
touch /etc/apache2/conf-available/php5-cgi.conf
gpg --keyserver --recv-key E9C74FEEA2098A6E
gpg -a --export E9C74FEEA2098A6E | apt-key add -
apt-get update
apt-get upgrade
apt-get install php5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: