connect() failed: No route to host
От | Jeff Fitzmyers |
---|---|
Тема | connect() failed: No route to host |
Дата | |
Msg-id | 3A38ED7D.538B7FE9@earthlink.net обсуждение исходный текст |
Список | pgsql-novice |
I get this error message: Unable to connect to PostgreSQL server: Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect() failed: No route to host Is the postmaster running (with -i) at '127.0.0.1' and accepting connections on TCP/IP port '5432'? in /usr/local/apache/htdocs/quote.php on line 21 With this query $conn = pg_Connect("host=127.0.0.1 port=5432 user=web password=web dbname=cast"); if (!$conn) { echo "An error occured connectin to the data base."; exit; } $sql="SELECT * FROM quote;"; $result_set=pg_Exec($conn, "$sql"); I do have a PG user with id=web password=web and a database named cast with 5 rows, and have tried host=192.168.1.1; host=asa.my.domain; user=postgres; etc. PG v 7.03 php v 4.0.3pl1 apache v 1.3.14 Freebsd 4.2 netstat -a Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 *.5432 *.* LISTEN tcp4 0 0 *.6000 *.* LISTEN tcp4 0 0 *.http *.* LISTEN tcp4 0 0 *.smtp *.* LISTEN tcp4 0 0 *.sunrpc *.* LISTEN tcp4 0 0 asa.domain *.* LISTEN udp4 0 0 *.sunrpc *.* udp4 0 0 *.1042 *.* udp4 0 0 asa.domain *.* udp4 0 0 *.syslog *.* udp4 0 0 *.router *.* ps -aux postgres 77504 0.0 1.6 4000 1940 ?? Is 6:28AM 0:00.00 \ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -i -S (postgres) I did configure php statically with: --with-pgsql=/usr/local/pgsql yet phpinfo() only shows (and for two days ago): './configure' '--with-apache=../apache_1.3.14' And there is a table titled pgsql showing pgsql.allow_persistent on on Apache table Hostname:Port 127.0.0.1:80 Apache Environment table HTTP_HOST 192.168.1.1 HTTP_REFERER http://192.168.1.1/ REMOTE_ADDR 192.168.1.1 SERVER_ADDR 192.168.1.1 SERVER_NAME 127.0.0.1 Environment table shows: LD_LIBRARY_PATH /usr/local/pgsql/lib HOST asa.my.domain In fact I have removed all php and apache files I could find and reinstalled from tar files multiple times. ifconfig fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::202:b3ff:fe0c:549f%fxp0 prefixlen 64 scopeid 0x1 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 Thanks for any suggestions!
В списке pgsql-novice по дате отправления: