Change the default PHP version from multiple PHP version (Version 7.0 to Version 7.1)
Disable the current php version
$ sudo a2dismod php7.0
Restart the apache
$ sudo systemctl restart apache2
Enable the expect php version
$ sudo a2enmod php7.1
** If problem arise then the following two line
$ sudo apt purge libapache2-mod-php7.1 libapache2-mod-php
$ sudo apt install libapache2-mod-php7.1 libapache2-mod-php
Enable the expect php version
$ sudo a2enmod php7.1
Restart the apache
$ sudo systemctl restart apache2
Check the php version
$ php -v
Finally set the php version
$ sudo update-alternatives --set php /usr/bin/php7.1
Check the php version
$ php -v
Restart the apache2
$ sudo systemctl restart apache2
Comments
Post a Comment