Subject: Re: PHP and Apache 2
To: Gan Uesli Starling <alias@starling.us>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 10/30/2005 20:16:28
On 10/30/05, Gan Uesli Starling <alias@starling.us> wrote:
> Just exploring some options now that I have PostgreSQL.
>
> Read up on a nifty thing called phpPgAdmin which seems
> quite the thing to have. And there is a package for it
> even.
>
> But on install, I get this message...
>
> <snip>
> Your Apache server must also be configured to support PHP, and PHP
> must be configured to support PostgreSQL by including this in php.ini:
>
> extension=3Dpgsql.so
> </snip>
>
> ...which sent me exploring. But all I find that seems relevent
> in pkgsrc is this...
>
> www/ap2-suphp-0.6.0
>
> ...since I am running Apache 2. And reading the DESCR of
> that seems to ring security alarms about PHP in general.
>
> I'm a Perl guy, myself, and don't know squat abut PHP. So
> my questions are...
>
> 1. Does PHP work with Apache 2 on NetBSD?
> 2. If so how to install, configure, etc. Where
>     are the docs?
> 3. Is PHP safe and recommended?
> 4. Is phpPgAdmin really cool enough to be worth
>     the trouble of going through the above?

I used that thing for a short time once. It is indeed cool. There is a
cool gui client based one too that sort of branched off the pgadmin
thing.

You need to go to /usr/pkgsrc/databases/php-pgsql and install that.
Then you get that pgsql.so extension. You can also compile this into
php if you compile it yourself or add some switch at configure time. I
don't remember what it is.

Beware though. I've noticed that the php and postgresql packages
aren't lining up. For instance, I think the only php package was 5,
but the php-pgsql was built on 4.3.x or something. You need to build
the same level of php-pgsql as php, and that might not be possible
right now. Kind of screwy really.

Andy