Your problem is probably in the /usr/local/pgsql/data/pg_hba.conf file.
That file lists what machines are allowed to connect to your Postgres
server and what sort of authentication they have to provide. If the web
server and the Postgres server are on the same machine, you should have
these two lines in that file:
local all trust
host all 127.0.0.1 255.255.255.255 trust
If they are on seperate machines, you will want to set up something like:
host all web.server.ip 255.255.255.255 crypt
and set up accounts/passwords for your PHP scripts, then use this sort of
thing to connect to the DB:
$dbCon = pg_PConnect("host=postgres.server.address user=username
password=password dbname=database.to.connect.to");
At 06:45 AM 10/9/99, Matthias Teege wrote:
>Moin,
>
>i have an PostgreSQL 6.0 Server wich I would query with php4b. I have
>problems to make the connection because off php gives me the following
>error message:
>
>Warning: Unable to connect to PostgresSQL server: Failed to
>authenticate client as Postgres user 'nobody' using authentication
>scheme 131072. in /usr/local/share/apache/htdocs/matthias/hellodb.php
>on line 2
>An error occured.
>
>Were is the Problem?
>
>Many thanks
>Matthias
>
>************
>