php中的pg_connect返回false

时间:2012-06-14 04:50:07

标签: php

我显示phpinfo()信息页面有pgsql enable支持 但在文件php

$dbconn =pg_connect("host=localhost port=5432 dbname=qlbv user=postgres password=123456")
 or die("can't connect db"); 

$ dbconn的结果为false;

我有配置

# "local" is for Unix domain socket connections only
local  all        all                              md5   
# IPv4 local connections:
host    all        all        127.0.0.1/32        md5   
# IPv6 local connections:
host    all        all        ::1/128              md5   
# IPv4 internet connections:
host    all        all        0.0.0.0/0            md5 

# - Connection Settings -
listen_addresses='*'
#listen_addresses = 'localhost'        # what IP address(es) to listen on;
                                        # comma-separated list of addresses;
                                        # defaults to 'localhost', '*' = all
                                        # (change requires restart)
port = 5432                            # (change requires restart)

我在centos中设置了webserver $ dbconn的结果为false; 你能帮助我吗? 谢谢!

1 个答案:

答案 0 :(得分:1)

你尝试类型:

getsebool -a | grep ftp
setsebool -P ftp_home_dir on
getsebool -a | grep ftp