sqlite could not find driver (SQL: PRAGMA foreign_keys = ON;)
Hi im trying to run the example laravel test, I have set the data base values as
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value="database/testing.sqlite"/>
in phpunit.xml. I am getting the error
Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = ON;)
I have enabled extensions sqlite3 and pdo_sqlite. Help would be appreciated
I have also manual uncommented the lines regarding pdo slqite in the PHP.ini files
php info() shows that i have sqlite pdo enabled but the command php -i only shows mysql pdo.
Hola amigo pudo responder ese problema? que hizo al fin? me paso lo mismo.
@Silver343 if you have a different PHP version using the command line (type
PHP -vto confirm), you probably need to update your environment variables:
Just click Menu > Tools > PATH environment variable > Add Laragon to Path
You then need to Log off and back on for the path to be added to all terminals (CMD/ Shell / Terminal etc.)
One point to note: if you change PHP version, you need to run Remove Laragon from Path, log off and back on. Then Add Laragon to Path log off and back on!
The new PHP version will then be available in all terminals.
I am working with a personal project which was sent to me, could you tell me why when I give to migrate my tables I get an error which says that "could not find drivers (SQL: PRAGMA foreign_keys = ON)".
I tell you today I did my upgrade to php 8.0.3 and the project I do with laravel 8, from laragon in the same I get activated or selected extension=pdo_sqlite
@Gabrielb2020 there are three known problems when switching to PHP8: