Skip to content
Advertisement

IlluminateDatabaseQueryException could not find driver Laravel

I deploy a laravel project on an apache server on a Debian 10 machine. The database is an MySQL deployed on another debian 10 machine on the same network.

I can go to the connection interface of the application but when I connect this error appears :

JavaScript

I have already tried these commands :

JavaScript

these commands work but do not solve the problem.

and I already tried to comment and uncomment this line in the php.ini :

JavaScript

in php-m i have PDO and pdo-mysql

and i have restart my server with :

JavaScript

after modification

Advertisement

Answer

I finally found the solution infact the php version used by apache was 7.3 and not 7.4 with :

JavaScript

however when I did:

JavaScript

the version was indeed 7.4. I followed this tutorial to change the version https://tecadmin.net/switch-between-multiple-php-version-on-debian/?amp and it works

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement