jcadima
5/31/2018 - 8:54 PM

Change PHP system version


https://www.tecmint.com/install-different-php-versions-in-ubuntu/

https://laracasts.com/discuss/channels/laravel/php-artisan-migrate-pdoexception-could-not-find-driver
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:
/usr/bin/

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