Bogdan Chytrek wrote:
>Why happens this?
>
>Warning: pg_connect() unable to connect to PostgreSQL server: FATAL:
>IDENT authentication failed for user "bchytrek" in
>/var/www/html/physio2/test.php on line 19
>
>The php-statement is :
>
>$conn = pg_connect("dbname=testdb user=bchytrek");
>
>the owner of that testdb is bchytrek and he does not have a password, he
>is in the users-list as superuser, an may cerate dbs.
>
>So why does the authentication fail?
>
>
>
Check your pg_hba.conf and postgresql.conf files.
I bet you forgot to turn on tcp/ip sockets, didn't you ;-)
On my RedHat 9 box:
-- /var/lib/pgsql/data/pg_hba.conf
#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 0.0.0.0 0.0.0.0 trust
-- /var/lib/pgsql/data/postgresql.conf
tcpip_socket = true
Try starting with something like THIS ... then tighten the security
after you get it to start working.
Dante