1
我展示的phpinfo()信息頁面的pgsql提供支持的 但是$ dbconn文件PHPpg_connect在PHP返回false
$dbconn =pg_connect("host=localhost port=5432 dbname=qlbv user=postgres password=123456")
or die("can't connect db");
結果是假的;
我不得不配置
在CentOS的# "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)
我設置Web服務器的$ dbconn 結果是假的; 你能幫我嗎? 謝謝!
你可以得到有關從問題的詳細信息。['pg_last_error()'](http://ch.php.net/manual/en/function.pg-last -error.php) – vstm
我已經從pg_last_error()獲得信息,但結果爲空 –