skip to Main Content

I want to use SQLite on laravel so I try to use

php .artisan migrate

and it give me an error

` IlluminateDatabaseQueryException

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

so I try to download sqlite3.dll from sqlite on https://www.sqlite.org/download.html
and add sqlite3.dll PHP/ext and it give me an other error

PHP Warning: PHP Startup: Can't load module 'C:PHPextsqlite3.DLL' as it's linked with 9.0, but the core is linked with 14.29 in Unknown on line 0

How can i fix this problem?
thanks !

PHP 8.2.3
laravel 8.x
windows 10

How can i fix this problem?
I find the solution on internet but almost are develop on Linux.
thanks !

2

Answers


  1. Chosen as BEST ANSWER

    check the phpinfo();
    you can see PDO make sure there have the sql driver you use.
    if not add

    extension=pdo_sqlite
    

    in php.ini
    it work for me !
    Good luck


  2. make sure that, SQLite extension is enabled in your PHP installation. To check use :
    <?php phpinfo(); ?>

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search