pg_connect() unable to connect to PostgreSQL server :could not connect to server
| From: | Vincent | Date: | Mon, 22 Jul 2002 07:29:41 +0000 |
| Subject: | pg_connect() unable to connect to PostgreSQL server :could not connect to server | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20698@lists.php.net to get a copy of this message | ||
Hi,
I'm a newbie. I've set up Apache 1.3.26 and Php
4.2.1. I've looked into phpinfo(); and I can see that
pgsql is working.
But, when I run a simple php file,
"<HTML>
<HEAD>
<TITLE>Example PHP Querying</TITLE>
<BODY>
<?php
echo "Hello";
$conn = pg_connect("host=localhost dbname=phpdb");
if (!$conn) {
echo "Unable to connect to database<br>";
} else
print "Connected";
?>
</BODY>
</HTML>"
I get these warnings. What should I do now? I've even
set the authorization to trust instead of ident in the
pg_hba.conf. Did I overlook something?
"Warning: pg_connect() unable to connect to PostgreSQL
server: could not connect to server: Connection
refused Is the server running on host localhost and
accepting TCP/IP connections on port 5432? in
/usr/local/apache/htdocs/postgresql.php on line 8"
Unable to connect to database
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com