Subject: Re: How to make PHP work in Apache?
To: Andy Ruhl <acruhl@gmail.com>
From: Carsten Pache <newsabo@gmx.info>
List: port-cobalt
Date: 04/11/2005 10:37:28
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?
--
Regards
Carsten