Wednesday, November 30, 2016

How to upgrade from PHP Version 5.5.9 to 5.6.28 on Ubuntu 14.04

How to upgrade from PHP Version 5.5.9 to 5.6.28

Today we learn 
How to Upgrade from php5.5.9 to php5.6.28 on ubuntu 14.04

Open the Terminal
First you need to remove php5.5.9 from your desktop or laptop
Run this command

:~$  sudo apt-get autoremove php5

then you need to add php5.6 repository to your source file
Type following command

:~$  sudo add-apt-repository ppa:ondrej/php

Next run update command 

:~$  sudo apt-get update

Next install php5.6 version and all dependency file

:~$  sudo apt-get install php5.6 php5.6-mysql php5.6-mbstring libapache2-mod-php5.6 php5.6-curl php5.6-gd php5.6-mcrypt php5.6-xml

Next step Disable Apache mode php5

:~$  sudo a2dismod php5

Then enable php5.6 

:~$  sudo a2enmod php5.6

Last step restart apache server

:~$  sudo /etc/init.d/apache2 restart

and check php version by using following command

:~$  php -v

ubuntu@ubuntu:~$ php -v
PHP 5.6.28-1+deb.sury.org~trusty+1 (cli)

Enjoy....
Any problem please comment me.