Problem with pg_connect on localhost

gtechnology

New Member
I've a server with postgresql installed on the postgres user. When I do:\[code\]su - postgres[entering the password]psql\[/code\]I can then execute queries on the database, that works fine.However, from my php script (running on my own account):\[code\]$dbconnection = pg_connect("host=localhost port=5432 user=postgres password=XXXXXXX ");\[/code\](password crossed out of course)I then get the message: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "postgres"FATAL: password authentication failed for user "postgres" in /home/username/script.php on line 18I tried a lot of variations on the login string, but I keep getting the same message. Any ideas how I could try to solve this?
 
Back
Top