Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pdo exception driver not found in laravel for sqlite

When I run php artisan migrate command I get:

[PDOException] could not find driver.

I made my default database as sqlite and checked whether there are pdo drivers for sqlite using php -i command. I could not understand my problem.

like image 645
Sai Harsha Avatar asked Aug 15 '16 05:08

Sai Harsha


Video Answer


2 Answers

Your system has missing php SQLite installation.

Install it by using:

sudo apt-get install php7.0-sqlite

Then restart your apache server

sudo /opt/lampp/lampp restart
like image 174
Jaymin Panchal Avatar answered Oct 02 '22 02:10

Jaymin Panchal


You need to install PDO on your server, or you might have to just comment out the following line in your php.ini file.

;extension=pdo_sqlite

(remove the ; character)

You should then restart your server.

like image 26
pimarc Avatar answered Oct 02 '22 02:10

pimarc