| From: | Ed Loehr <eloehr(at)austin(dot)rr(dot)com> |
|---|---|
| To: | Hans Rakers <hans(at)clubned(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: [GENERAL] How to configure PostgreSQL for PHP access & postgresadmin |
| Date: | 2000-03-03 16:16:13 |
| Message-ID: | 38BFE54D.1F486397@austin.rr.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hans Rakers wrote:
>
> Can any of you tell me how i configure PostgreSQL for access by PHP? I
> have PHP compiled as a Apache module (with pgsql support ofcourse), and
> Apache runs under nobody:nogroup. What needs to be done to be able to
> use pgsql via PHP with regards to what users need to be added, what
> files need editing and how to make the whole thing secure?
I'm not using PHP, but I am using Apache with pgsql (and modperl).
My choice was to create a single user (see CREATE USER in the docs)
who owns the apache processes and through which all db queries are
performed.
BTW, it is commonly considered a security hole to run as user nobody
because a number of programs do so (compromise one, compromise all).
Maybe better to create a special-purpose user (e.g., 'www) to own your
apache processes.
> Also i'm having trouble using postgresadmin from www.phpwizard.net. It
> displays the following error:
>
> --
> Warning: Unable to connect to PostgresSQL server: FATAL 1: Database
> dbname=template1 does not exist in pg_database in lib.inc.php3 on line
> 125
> --
>
> Although the database template1 does exist when loging in as the
> postgres superuser and executing 'psql template1'. Am i doing anything
> wrong here??
Hmmm...is your failing account missing the PGDATA env variable
setting??
Cheers,
Ed Loehr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Wolfe | 2000-03-03 16:22:27 | Re: [GENERAL] Simple problem? |
| Previous Message | Andrzej Mazurkiewicz | 2000-03-03 16:04:49 | RE: [GENERAL] FOREIGN KEY syntax |