Home > Linux > How to install PHP7.1 and PHP 5.6 in Ubuntu 14

How to install PHP7.1 and PHP 5.6 in Ubuntu 14

How to install PHP7.1 and PHP 5.6 in Ubuntu 14

Update the repositories

Add PPA for PHP7 to the system apt repository

then again do update the repository

Install PHP7.1

To install PHP 5.6

Now tricky part is to enable/disable mod for PHP7.1 and PHP5.6 to switch between both version.

When we have both PHP5.6 and PHP7.1 installed.

To run PHP7.1

To run PHP5.6

In Ubuntu 14.4 when you install PhpMyadmin then it install Php5.5.9 along with it and it enable the mod by default.

and you will get error while switching between those version. here you have to permanently disable the PHP5.5.9

Now you have both the version installed and can easily switch between PHP5.6 and PHP7.1.

 

You may also like :

solve phpinfo() shows version 5.5.9 but in cli php -v shows version 7.1

Basic easy steps to install Apache, PHP, MySql and PhpMyAdmin in Ubuntu

How to install nginx, mysql, phpmyadmin, php in Ubuntu

Durga Charan Ojha
I am a proud Indian, proud father, a blogger, Being in a profession as System administrator, my passion is troubleshooting computer issues, I do like sharing solutions through blogging making videos of solving issues.
https://lifeonnetwork.com/

Leave a Reply

Your email address will not be published. Required fields are marked *

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