sqlite could not find driver (SQL: PRAGMA foreign_keys = ON;)

  • | 156 points

    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

    1. Tests\Feature\ExampleTest::testBasicTest
      Illuminate\Database\QueryException: could not find driver (SQL: PRAGMA foreign_keys = ON;)

    I have enabled extensions sqlite3 and pdo_sqlite. Help would be appreciated

  • | 156 points

    I have also manual uncommented the lines regarding pdo slqite in the PHP.ini files

  • | 156 points

    php info() shows that i have sqlite pdo enabled but the command php -i only shows mysql pdo.

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.