I am facing a issue that I cannot resolve. I have my app hosted on my server using Ubuntu 16.04, PHP 7.1, MySQL and NGINX. My app works perfect. When I ssh to my server and app root I run the following, php artisan session:table, it runs successfully.
When i run php artisan migrate I get foll0wing error and table is not created in my DB.
[Illuminate\Database\QueryException]
could not find driver (SQL: select * from information_schema.tables where t
able_schema = UNIT3D and table_name = migrations)
[PDOException]
could not find driver
Any ideas? Im trying to use this.https://github.com/thomastkim/laravel-online-users
I would start by determining the exact php modules installed. This can be accomplished by
php -m
look for 'phpX.Y-mysql', if you do not see it then the php module is NOT installed. (Where X.Y correspond to your php version number.
Assuming that you do not see it, you can find the exact package version to install from the repos by typing:
sudo apt-cache search php-mysql
Your results will be similar to:
sudo apt-cache search php-mysql
php-mysql - MySQL module for PHP [default]
php7.0-mysql - MySQL module for PHP
php5.6-mysql - MySQL module for PHP
php-mysqlnd-ms - MySQL replication and load balancing module for PHP
php7.1-mysql - MySQL module for PHP
Install the proper php module for your version. Ex:
sudo apt-get install php7.1-mysql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With