在Laravel5.4中找不到驱动程序

hjqgdpho  于 2021-06-20  发布在  Mysql
关注(0)|答案(2)|浏览(287)

我从angular project发送请求时收到此错误。
找不到驱动程序(sql:插入到 employees ( name , address , gender , department_id , education , experiance , updated_at , created_at )价值观(karly frost,aliquam quo anim illum et nisi occaecat quam and ut eveniet animi natus,f,2,eveniet in ab architecto neque ut molestiae magnam aliquip deleniti dolores quia hic est nobis tempora rerum,laboraiosam reprehenderit sint minima dolore quis dolorem perferendis,2018-05-20 22:54:20,2018-05-20 22:54:20))
但是当我尝试用
php artisan tinker命令并使用laravel执行插入查询,效果非常好
否则我就有例外了
注意:我使用ArchManjaro作为我的linux发行版

m528fe3b

m528fe3b1#

你应该在你的服务器上安装pdo。编辑php.ini(查看phpinfo(),“loaded configuration file”行,找到php.ini文件路径)。查找并取消注解以下行(删除;字符):

;extension=pdo_mysql.so

然后,重新启动apache服务器。更多信息,请阅读http://php.net/manual/en/pdo.installation.php.

k7fdbhmy

k7fdbhmy2#

也许apache使用的php和链接到命令行的php之间存在冲突。检查一下你的php版本和设置,希望能对你有所帮助
多亏了apokryfos
在这里检查这个答案

相关问题