Skip site navigation (1) Skip section navigation (2)

Re: Postgres access using PHP

From: John Poltorak <jp(at)eyup(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres access using PHP
Date: 2001-01-14 23:29:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Sun, Jan 14, 2001 at 10:27:57PM +0000, John Poltorak wrote:
> I am trying to access a Postgres database using PHP from a Web page
> and it doesn't work.
> Could anyone shed any light on the problem?
> This is the error I get - which looks like an authentication problem:-
> Unable to connect to PostgreSQL server:  FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
> What have I overlooked in setting up Postgres for Web access?

Many thanks to everyone who suggested my Web server was running as 'root'
and this was the cause of the problem.

I'd just like to point out that I'm running Postgres, PHP4, and Xitami
all under OS/2, which is a single-user OS, and the USER variable does
not get set automatically.

I have set the this variable to POSTGRES before starting Xitami,
just to make sure I can get everything going and it works fine now,

So, thank you all.


In response to


pgsql-novice by date

Next:From: Ron ChmaraDate: 2001-01-14 23:32:12
Subject: Re: Postgres access using PHP
Previous:From: ChrisDate: 2001-01-14 22:58:02
Subject: Re: Postgres access using PHP

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group