PDO_SQLITE 驱动程序不存在..怎么办? [英] PDO_SQLITE driver not present.. what to do?

查看:46
本文介绍了PDO_SQLITE 驱动程序不存在..怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到处都看到(包括在官方文档中)PDO_SQLITE 驱动程序默认/应该包含在 PHP 中.

I see everywhere (including on the official docs) that the PDO_SQLITE driver is/should be included by default in PHP.

然而,当我查看我的 extension_directory 时,我只看到这些文件:

However, when I look at my extension_directory, I see only these files:

gd.so mcrypt.so mysqli.so mysql.so pdo_mysql.so pdo.so

因此,我尝试安装的框架 (Symfony) 告诉我我需要安装 PDO_SQLITE 或 SQLite3 .so 扩展...

And, as a result, a framework I'm trying to install (Symfony) tells me I need to install either the PDO_SQLITE or the SQLite3 .so extensions...

有人可以帮忙吗?我可以尝试在网络上的某个地方找到所需的 .so 文件,将其放在我的 extensions_directory 中,然后将其包含在 php.ini 中吗??

Can anyone help? Can I just try and find the needed .so file somewhere on the web, place it in my extensions_directory and then include it in php.ini??

顺便说一句:我正在运行通过 apt-get 在 ubuntu 上下载的 php 5.3.6.

BTW: I'm running php 5.3.6 downloaded via apt-get on ubuntu.

推荐答案

你试过 sudo apt-get install php5-sqlite 吗?

当前版本:sudo apt install php7.4-sqlite

这篇关于PDO_SQLITE 驱动程序不存在..怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆