本文介绍了Laravel从sqlite DB登录,得到"PDOException not found driver".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在本地主机(vagrant和virtualbox)上使用Laravel和sqlite DB编写一个简单的登录表单.但是,输入用户名和密码后,我不断收到"PDOException not found driver"错误.有什么想法吗?

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?

-编辑--

必须通过键入

  sudo apt-get install php5-sqlite

在我的终端窗口中.默认情况下未启用它:/

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

推荐答案

听起来您的PHP版本丢失或已禁用PDO扩展.使用phpinfo功能列出已安装和启用的扩展.如果PDO不存在,请在您的php.ini文件中查找带注释的行,并/或与维护服务器的人员联系.

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.

这篇关于Laravel从sqlite DB登录,得到"PDOException not found driver".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 21:42