Could not find driver when using sqlite


  • | 108 points

    Hi, am currently new on using laragon and am working on a project using laravel.
    Trying to build this project using TDD and when I tried to run a test it gives me an error.

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

    I already configured my settings from MENU -> PHP -> Extensions and enabled sqlite3.

    Am using Laravel 5.8 and am on windows


  • administrators
    | 114247 points

    @leonardpbdigital :

    1. Can you show phpinfo() that the sqlite driver enabled?
    2. Are you sure the TDD use sqlite as default database?

  • | 26 points

    Go to the folder .../laragon/bin/php/php-xxx and edit php.ini. Uncomment the line 'extension=pdo_sqlite'


Log in to reply
 

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