Subject: Re: How to make PHP work in Apache?
To: Carsten Pache <newsabo@gmx.info>
From: Andy Ruhl <acruhl@gmail.com>
List: port-cobalt
Date: 04/11/2005 06:20:09
On Apr 11, 2005 1:37 AM, Carsten Pache <newsabo@gmx.info> wrote:
> On Friday, April 8, 2005, Andy Ruhl <acruhl@gmail.com> wrote:
> 
> >> I installed Apache 2.0.53 and PHP 5.0.3 from pkgsrc (make, make
> >> install). Apache works, but how do I include PHP? So far I only worked
> >> with a LAMP installation where everything was setup automatically.
> >>
> >> Any hints?
> 
> > Install /usr/pkgsrc/www/ap-php/
> 
> > There should be a message about how you need to configure apache to
> > make it work.
> 
> Thanks for your help - that was the part that apparently was missing.
> 
> However, the message that is shown after PHP has been installed is a
> little bit misleading:
> 
> ===========================================================================
> $NetBSD: MESSAGE,v 1.1.1.1 2004/11/04 18:42:03 jdolecek Exp $
> 
> In order to use this module in your Apache 1.x installation, you need to
> add the following to your httpd.conf file:
> 
>   LoadModule php4_module lib/httpd/mod_php5.so
>   AddType application/x-httpd-php .php
> 
> You may also add following if you still use .php3 files:
> 
>   AddType application/x-httpd-php .php3
> 
> For Apache 2.x installation, you need following:
> 
>   LoadModule php4_module lib/httpd/mod_php5.so
>   AddHandler application/x-httpd-php .php
> 
> You may also add following if you still use .php3 files:
> 
>   AddHandler application/x-httpd-php .php3
> ===========================================================================
> 
> "php4_module" has to be replaced by "php5_module", otherwise you get
> an error (something like "undefined symbol" in
> "lib/httpd/mod_php5.so"). With "php5_module" it works (at least I now
> get the phpinfo screen).
> 
> 
> > I used to have to hand edit php.ini to make it work with other plugins
> > like postgresql or mysql, but I don't think you have to do that
> > anymore (that's only if you want to use those).
> 
> I also need mysql. How long did the "make/make install" routine of
> mysql take?

Hmm, that may mean that php5 is the new default? If it is, you should
send in a pr on that. It's been php4 for quite a while. I had heard
that php5 was a no-no a while back anyway. php has had a lot of
serious bugs lately.

I can't remember how long it took to do mysql. I basically hate mysql
and I was only trying it to do something that some jerk ISP wouldn't
let me do with postgres because they didn't have it. I still fail to
believe how a kludge like mysql is more widely used than something as
elegant as postgresql (vacuum notwithstanding), and the only answer I
have is GPL ignorance.

But back to the question, everything takes a long time to build on the
Qube, doesn't it? :)

Andy