Date: Sat, 24 Aug 2002 13:20:00 +0200 From: "Patrick O'Reilly" <bsd@perimeter.co.za> To: "Brossin Pierrick" <pbrossin@swissgeeks.com>, freebsd-questions@freebsd.org Subject: Re: apache2 and php4 Message-ID: <001401c24b60$346d09e0$0200000a@perimeter.co.za> References: <000501c24b5d$4f1b8300$3200000a@nitrox>
next in thread | previous in thread | raw e-mail | index | archive | help
From: "Brossin Pierrick" <pbrossin@swissgeeks.com> > Hi, > > I compiled those two ports and actually PHP is not working if I create a > .php ou .php4 file. > > I'm aware I should maybe make some changed on httpd.conf but I'm wondering > why. > Doesn't the PHP4 port modify the conf file automatically ? Yes. To verify: ---- # cd /usr/local/etc/apache # grep php httpd.conf LoadModule php4_module libexec/apache/libphp4.so AddModule mod_php4.c <IfModule mod_php3.c> <IfModule mod_php4.c> DirectoryIndex index.php index.php3 index.html <IfModule !mod_php4.c> DirectoryIndex index.php3 index.html <IfModule !mod_php3.c> <IfModule mod_php4.c> DirectoryIndex index.php index.html <IfModule !mod_php4.c> <Files ~ "\.(cgi|shtml|phtml|php3?)$"> ---- The first two lines (LoadModule and AddModule) are the lines added when you install php4. But - I have seen the install script do something silly of you have apache+mod_ssl. If the above looks fine, but you have apache+mod_ssl, then the problem is this: The install script places the LoadModule line INSIDE the conditional processing for SSL. This is a bug (as far as I am concerned). You might find the following lines inside httpd.conf: ---- <IfDefine SSL> LoadModule ssl_module libexec/apache/libssl.so LoadModule php4_module libexec/apache/libphp4.so </IfDefine> ---- If so, simply move the php4 line outside of the IfDefine, like this: --- LoadModule php4_module libexec/apache/libphp4.so <IfDefine SSL> LoadModule ssl_module libexec/apache/libssl.so </IfDefine> --- Do something similar for the AddModule line for php4. Then : # /usr/local/etc/rc.d/apache.sh stop # /usr/local/etc/rc.d/apache.sh start HTH. --- Regards, Patrick O'Reilly. ___ _ __ / _ )__ __ (_)_ __ ___ _/ /____ __ / __/ -_) _) / ~ ) -_), ,-/ -_) _) /_/ \__/_//_/_/~/_/\__/ \__/\__/_/ http://www.perimeter.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001401c24b60$346d09e0$0200000a>