php 如何使用 CentOS 启用 PDO?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2320644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 06:01:39  来源:igfitidea点击:

How do I enable PDO using CentOS?

phppdocentos

提问by mike

When outputting phpinfo(); I can see that PDO is set to '--disable-pdo' in the Configure Command section. How can I enable this using SSH?

输出phpinfo()时;我可以看到 PDO 在“配置命令”部分中设置为“--disable-pdo”。如何使用 SSH 启用此功能?

采纳答案by streetparade

Try

尝试

pecl install pdo

EDIT:

编辑:

If it is already installed try edit

如果已经安装,请尝试 编辑

/etc/php.ini 

Add this line

添加这一行

; Extension PDO
extension=pdo.so

EDIT :

编辑 :

if you dont have access to php ini try try this in your php aplication

如果您无权访问 php ini,请尝试在您的 php 应用程序中尝试此操作

if (!extension_loaded('pdo')) 
{
    dl('pdo.so');
}