goneskiing
December 13th, 2005, 01:19 AM
I am having trouble connecting php(5.1.1) and postgresql(8.1). Both run fine separately. 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: pg_connect(dbname=tempdb user=tempuser).
If I run psql -l it shows the database "tempdb" with the username "tempuser". 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.
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: pg_connect(dbname=tempdb user=tempuser).
If I run psql -l it shows the database "tempdb" with the username "tempuser". 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.