I am having trouble connecting php(5.1.1) and postgresql(8.1) running on
Ubuntu Breezy. Both run fine separately. I created a user (tempuser) and
a database (tempdb).  If I run psql -l it shows the database "tempdb"
with the username "tempuser".  But I get the following error using
pg_connect:

Warning: pg_connect() [function.pg-connect]: Unable to connect to
PostgreSQL server: FATAL: Ident authentication failed for user
"tempuser" in /var/www/db_connect.php on line 14

The line 14 is the pg_connect statement:
        $dbname = "tempdb";
        $user = "tempuser";
        $pass = "";
        $dbstr = "dbname=" . $dbname;
        $dbstr .= " user=" . $user;
        //$dbstr .= " password=" . $pass;
        return(pg_connect($dbstr));

Now I did not create a password when I created the user and in
pg_connect just use the dbname and username values - is that a problem?
thanks.
ps: I tried it with the password value but that failed with same error.


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to