|
apache版本是2.2.6
php版本是5.2.4
postgressql版本是8.2.5,监听所有的地址。
postgresql已经可以用pgadminIII来访问了, 端口号是5432。
apache的<? phpinfo() ?>中也有显示postgresql这一段,内容如下
[PHP]
pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 8.2.5
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0
Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited
[/PHP]
但是执行
<?php
$dbconn = pg_connect("host=localhost user=maker123 dbname=maker123");
pg_close($dbconn);
?>
这个脚本时,总是提示
[PHP]
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection timed out Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? in /WebRoot/test/index.php on line 2
[/PHP]
在出错前运行ss
提示:
SYN-SENT 0 1 127.0.0.1:49964 127.0.0.1:postgresql
求各位大侠解救 |
|