Subject: Re: PHP and Apache 2
To: Gan Uesli Starling <alias@starling.us>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 11/02/2005 13:37:35
Gan Uesli Starling <alias@starling.us> writes:

> 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=pgsql.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?

Yes, or at least last time I built it.    See pkgsrc/www/ap-php.  I
already had apache 2 and php4 built when I built this.

> 2. If so how to install, configure, etc. Where
>     are the docs?

See the Makefiles in pkgsrc/www/{php*,apache*,ap-php}.  Seriously, I
built www/apache2 and www/php4, and then www/ap-php, and then perhaps
had to add a line to apache config, and then gallery (photo website
code) basically worked.  I forget the details, but it didn't seem hard.

> 3. Is PHP safe and recommended?

No, it is very scary, but many people fine it too useful to just say
no.  Run "egrep ^php /usr/pkgsrc/distfiles/pkg-vulnerabilities" and
browse the many fine advisories.

-- 
        Greg Troxel <gdt@ir.bbn.com>