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,
<TITLE>Example PHP Querying</TITLE>
echo "Hello";
  $conn = pg_connect("host=localhost dbname=phpdb");
    if (!$conn) {
      echo "Unable to connect to database<br>";
    } else
    print "Connected";

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

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to