I am trying to run a new Laravel app on my sever but I am getting the following error:
QueryException (SQL) could not find driver (SQL: select * from
settings
limit 1)
Using the debugbar I can see the error is for PDO: LOG.error:
PDOException: could not find driver in /home/mysite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:
What doesn't make sense is that I actually already have PDO installed, I know this because I ran the first php artisan migrate
and it created all the tables in my MYSQL DB fine.
I have ran php -m | grep mysql
to verify what mysql related PHP extensions I have:
$ php -m | grep mysql
mysqli
mysqlnd
pdo_mysql
I should note that PHP can use MySQL as I have a Wordpress blog running on the same server fine.
I have already tried clearing the cache and updating composer packages, I have also completely removed doctrine/dbal
and reinstalled.
Update: If I remove the package doctrine/dbal
and clear the caches, I still receive an error about PDOExceptions:
Illuminate\Database\QueryException could not find driver /home/mysite.com/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php#68