Debian 7 come with php 5.4.x. and it is now not secure now plus it is very good idea to get updated. right now php 5.6 or 7 can be upgraded.  But php 7 is in beta now and lots of other thing related in not clear to me right now. so i am going with php 5.6.

now how can we upgrade my server to php 5.4 to php 5.6 with out any problem. i found out that official packages is not yet added to php 5.6. so i was looking for third party solution. and i found one it is very good as it explain how to do it.

now lets start by editing the source.list file in debian.

sudo nano /etc/apt/sources.list

 and add this line to your file.

for debian jessie

deb jessie all

deb-src jessie all

for debian wheezy

deb wheezy all

deb-src wheezy all

for debian squeeze

deb squeeze all

deb-src squeeze all

 now to install php 5.6 from there repo add this line on the same file too


for debian wheezy  (without Zend thread safety)

deb wheezy-php56 all

deb-src wheezy-php56 all

for debian "Wheezy" (with Zend thread safety)

deb wheezy-php56-zts all

deb-src wheezy-php56-zts all

now save the file and do the next command below


sudo apt-key add dotdeb.gpg

Now do this command in terminal

sudo apt-get updare

sudo apt-get install php5

after that check your php version by typing "php -v" in terminal of you can use phpinfo(); in php file.

About Author
Riaz Uddin Masum
Web Master
Hi, I am Riaz Uddin Masum, This is my play ground for web and IT. I like to read and write about any IT related Topic. I love to Design and Develop web site. it is my job too. My objective is to establish my career in web.
Other articles

DMC Firewall is developed by Dean Marshall Consultancy Ltd