Re: [GENERAL] Connect PostgreSQL 6.0 Server with php4b

From: Charles Tassell <ctassell(at)isn(dot)net>
To: Matthias Teege <matthias(at)mteege(dot)de>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Connect PostgreSQL 6.0 Server with php4b
Date: 1999-10-10 19:51:24
Message-ID: 4.1.19991010164209.009f8770@mailer.isn.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
>
>************
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yin-So Chen 1999-10-10 20:44:00 Re: [GENERAL] stored procedure revisited
Previous Message Bruce Momjian 1999-10-10 14:42:18 Re: [GENERAL] You are really hosed.