Because_i_love_you
Because_i_love_you

Reputation: 143

pg_connect in php return false

I show phpinfo() info page has pgsql enable support But in file php

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

result of $dbconn is false;

I had config

# "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)

I setup webserver in centos result of $dbconn is false; Can you help me? thanks!

Upvotes: 2

Views: 1248

Answers (1)

D T
D T

Reputation: 3746

you try types:

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

Upvotes: 1

Related Questions