我已经安装了postgres9.4和pgadmin3。之后我尝试为php连接安装“install pdo_pgsql”,但由于某些依赖性,它给出了错误并且没有安装包。
我得到了这样的错误消息:“调用未定义的函数pg_pconnect()”。

最佳答案

你就不能:

yum install php-pgsql.x86_64

之后需要重新启动httpd。通过检查模块列表或:
echo phpinfo();

关于php - 无法在centos 7中使用php连接到postgres数据库,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38100251/

10-14 13:37