Posted on 12 May 2018 10:05:22 (6 months ago)
Switching PHP 5.6 to PHP 7.1
To set the PHP version that will work with Apache web server, use the commands below. First disable the current version with the a2dismod command and then enable the one you want with the a2enmod command.
sudo a2dismod php5.6
sudo a2enmod php7.1
sudo systemctl restart apache2
After switching from one version to another, you can find your PHP configuration file, by running the command below,
sudo update-alternatives --set php /usr/bin/php7.1