Hi all,
after some tries to connect with postgres I have yet problem.
The php code to connect:
<?php
pg_connect("host=localhost port=5432 dbname=[user]_[dbname] user=[user]_[dbuser] password=[passwd]");
?>
with [user], [dbname], [dbuser] and [passwd] right strings,
returns:
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "[user]" in /home/[user]/...
I've found that "host=localhost and port=5432" is right, but the error "Ident authentication failed" tell me there is only ident sameuser authentication method to connect postgres, so I should have a database naming "[user]" and not "[user]_[dbname]" created with cPanel (is not possible to create a database only "[user]" with cPanel).
I think maybe this problem is the same to connect with phpPgAdmin as detailed by djbob:
I think "password" and "md5" authentication methods are better because more flexibles, but until cPanel don't fix the bug we can't do nothing.
Is there a way to connect? Is someone can connect with his postgre's database? How?
Thank you in advance
Davide