Updated : Oct 24, 2016 in Apache

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 http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all
deb http://packages.dotdeb.org wheezy-php56-zts all
deb-src http://packages.dotdeb.org 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 pgpkeys.mit.edu --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: