babysure
babysure

Reputation: 71

Symfony 4 : ADD SQLITE DATABASE

I have a problem with symfony to replace the mysql database with sqlite, and so actually I've already done some research on the subject and so I've already done some things like :

but I keep running into these red error lines

Upvotes: 0

Views: 4873

Answers (2)

babysure
babysure

Reputation: 71

finally, the solution was quite simple it was enough to install the appropriate driver for the good version of php I work with php7.3 so it was necessary to do:

sudo apt-get install sqlite3

sudo apt-get install sqlitebrowser

sudo apt-get install php7.3-sqlite3

Upvotes: 3

AlexioVay
AlexioVay

Reputation: 4527

Did you try the recommendations from the official Symfony documentation for doctrine?

The .env file should be like this:

DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"

Also this should help you:

PDO_SQLITE driver not present.. what to do?

Upvotes: 0

Related Questions