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
How do I enable PDO using CentOS?
提问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');
}

