5/31/2018 - 8:54 PM

Change PHP system version


If you are having issues with php artisan tinker , errors about SQL driver not being found 
it is because it is referring to 2 different PHP versions: 7.2 and 7.1 installed, but making use
of 7.2 which is default on Ubuntu 18.04

(1) check current php version
php -v

example: php 7.2

(2) check php versions here:

we want 7.1, check if this is available then change to this version

sudo update-alternatives --set php /usr/bin/php7.1

(3) run php -v again and see it changed to 7.1