原文:postgresql connection failure:SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?

PHP 程序无法连接到 CentOS 上的PostgreSQL,但是在 CentOS 服务器上却能正常运行 psql, 操作如下:多次重启 PG 数据库后发现 CGI 脚本无法连接数据库,但是可以使用 psql 连接上数据库 PHP 程序报错如下: 网上查了很多文章,发现是SELinux Linux上的强制访问控制安全模块 惹得祸,很想关闭它, 但是据说他是系统被攻破后的最后一道防线,那就暂时记录 ...

2018-10-29 00:52 0 2734 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM