postgresql 在centos上安装pdo_pgsql
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14017774/
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
installation of pdo_pgsql on centos
提问by neeraj
I have install pdo_pgsql by running command below command on CentOS 5.7
我已经通过在 CentOS 5.7 上运行以下命令来安装 pdo_pgsql
pecl install pdo_pgsql
But it does not show at phpinfo page as an installed extension. The only info i see at there is
但它不会在 phpinfo 页面上显示为已安装的扩展。我在那里看到的唯一信息是
--with-pgsql=shared
have i missed anything?
我错过了什么吗?
At my machine php 5.3.3 is installed.
在我的机器上安装了 php 5.3.3。
回答by Michel Feldheim
--with-pgsql=shared
Indicates, that the default PostgreSQL extension was compiled as a module when your PHP was compiled.
表示在编译 PHP 时,默认的 PostgreSQL 扩展被编译为一个模块。
Pecl doesn't simply install a module, it also compiles them from source and therefore has a lot of dependencies which are not automatically resolved.
Pecl 不只是安装一个模块,它还从源代码编译它们,因此有很多不能自动解决的依赖项。
If pecl doesn't output any error message you probably simply need to add the extension in your /etc/php.ini
如果 pecl 没有输出任何错误消息,您可能只需要在您的 /etc/php.ini
extension=pdo_pgsql.so
Did you try to install the extension using yum?
您是否尝试使用 yum 安装扩展?
EDIT
编辑
To remove an pecl extension
删除 pecl 扩展
sudo pecl uninstall extension_name
Don't forget to restart Apache after your installation so any changes actually have an effect.
不要忘记在安装后重新启动 Apache,这样任何更改都会生效。
sudo service httpd restart