17

I am trying to write a simple login form using Laravel and sqlite DB on localhost (vagrant and virtualbox). However, after entering username and passoword I keep getting "PDOException could not find driver" error. Any ideas?

--- EDIT ---

Had to install sqlite driver by typing

  sudo apt-get install php5-sqlite

in my terminal window. It was somehow not enabled by default :/

5
  • Can you show us your /app/config/auth.php and /app/config/database.php? Don't forget to remove passwords ;) Commented Oct 21, 2014 at 11:17
  • What do you mean by removing passwords? Commented Oct 21, 2014 at 17:11
  • When you post your database.php don't show us your passwords. Commented Oct 21, 2014 at 20:50
  • It's on localhost and for acedemic activity only. No problem Commented Oct 22, 2014 at 4:35
  • @deividaspr You should add your solution as an answer. I would be the first to upvote it because it solved my issue. Thanks! Commented Oct 28, 2015 at 18:26

2 Answers 2

8

It sounds like your version of PHP is either missing, or has disabled, the PDO extension. Use the phpinfo function to list out the extensions installed and enabled. If PDO isn't there, look for a commented line in your php.ini file(s) and/or talk to the person maintaining your servers.

Sign up to request clarification or add additional context in comments.

1 Comment

I have found that sqlite is not enabled by using phpinfo - "PDO drivers mysql". How should I do it? Thank you
0

Your system has missing php SQLite installation.

Install it by using:

sudo apt-get install php7.0-sqlite

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.