Debian 7.x - Install PHP 5.6

Debian 7.8 will install PHP 5.3.3 by default. If you want to get version 5.6 which has performance improvements, or if you need the "readline" function to work, then you can use the Dotdeb packages to install version 5.6. Dotdeb is a repository containing packages to turn your Debian boxes into powerful, stable and up-to-date LAMP servers.


Add the Dotdeb main repositories

echo "deb wheezy all  
deb-src wheezy all" | sudo tee -a $FILEPATH  

Add the Dotdeb repos necessary for php 5.6 (threadsafe)

echo "deb wheezy-php56-zts all  
deb-src wheezy-php56-zts all" | sudo tee -a $FILEPATH  

Add the GPG key

sudo apt-key add dotdeb.gpg  

Now update and install the packages you need.

sudo apt-get update  
sudo apt-get install php5-cli -y  



Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites. More info.