How to Upgrade PHP 5.6 to 7.1 on Ubuntu
By Anuket Jain On 27 February 2017 In Linux
You have two completely separate versions of PHP installed on your system. The config files for PHP 5.6 is /etc/php/5.6 and for PHP 7.1 is /etc/php/7.0 respectively. Some of the reasons you need to use PHP 7.1 without removing PHP 5.6.
See Also:
So we are mentioning the steps to upgrade the PHP.
Upgrade PHP from 5.6 to 7.1
Suppose PHP 5.6 is set on your system and you need to upgrade it to PHP 7.1 without removing PHP 5.6. Run below command to upgrade the PHP version.
Apache:
$ sudo a2dismod php5.6 $ sudo a2enmod php7.1 $ sudo service apache2 restart
Command Line:
$ update-alternatives --set php /usr/bin/php7.1
Enjoy it!
No Responses