如何在 CentOS 上配置 php 以启用 pdo 并包含 mysqli
问题描述
CentOS 上的 PHP 5.3.3 版(x86_64,RHEL 6)
PHP Version 5.3.3 on CentOS (x86_64, RHEL 6)
显然,我的 PHP 安装配置为出于某种原因排除 Mysqli 并禁用 PDO.因此,当我尝试从 shell 使用 php 命令时,我相信这是导致它们无法工作的原因.我可以通过 HTTP 加载 mysqli 和 pdo 就好了,但它们不能从 shell 工作.我如何启用这些组件以及这样做的风险是什么?
Apparently my PHP installation was configured to exclude Mysqli and disable PDO for some reason. Therefore, I believe this is what's causing them to not work when I try to use the php command from the shell. I can load mysqli and pdo via HTTP just fine, but they don't work from shell. How do I enable these components and what are the risks in doing so?
配置命令:
解析的其他 .ini 文件:
Additional .ini files parsed:
/etc/php.ini
/etc/php.ini
推荐答案
您可能只需要安装软件包.
You might just have to install the packages.
安装后,重新启动 Apache.
After they're installed, restart Apache.
或
这篇关于如何在 CentOS 上配置 php 以启用 pdo 并包含 mysqli?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!