user6082142
user6082142

Reputation:

(php) sqlite in-memory db gets "could not find driver" error

I have installed php7.1.7 in my Windows. New Laravel 5.4 install; tried configuring phpunit to use in-memory sqlite db as such

    <env name="APP_ENV" value="testing"/>
    <env name="DB_CONNECTION" value="sqlite"/>
    <env name="DB_DATABASE" value=":memory:"/>

running vendor/bin/phpunit fails with:

1) Tests\Feature\ThreadsTest::a_user_can_browse_threads Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

If I try another value for DB_DATABASE, other than ':memory:' it fails with a database not found error, but not the 'could not find driver' error

Upvotes: 1

Views: 1415

Answers (1)

Far Funn
Far Funn

Reputation: 21

open php.ini file. enable php_pdo_sqlite.dll by removing semicolon

Upvotes: 2

Related Questions