From owner-freebsd-questions Sat Aug 24 4:20: 8 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB08F37B400 for ; Sat, 24 Aug 2002 04:20:00 -0700 (PDT) Received: from perimeter.co.za (obelix.perimeter.co.za [209.212.102.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CF7243E3B for ; Sat, 24 Aug 2002 04:19:56 -0700 (PDT) (envelope-from bsd@perimeter.co.za) Received: from asterix (ndf-dial-196-30-124-113.mweb.co.za [196.30.124.113]) (AUTH: LOGIN bsd@perimeter.co.za) by perimeter.co.za with esmtp; Sat, 24 Aug 2002 13:19:52 +0200 Message-ID: <001401c24b60$346d09e0$0200000a@perimeter.co.za> From: "Patrick O'Reilly" To: "Brossin Pierrick" , freebsd-questions@freebsd.org References: <000501c24b5d$4f1b8300$3200000a@nitrox> Subject: Re: apache2 and php4 Date: Sat, 24 Aug 2002 13:20:00 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: "Brossin Pierrick" > 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 DirectoryIndex index.php index.php3 index.html DirectoryIndex index.php3 index.html DirectoryIndex index.php index.html ---- 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: ---- LoadModule ssl_module libexec/apache/libssl.so LoadModule php4_module libexec/apache/libphp4.so ---- If so, simply move the php4 line outside of the IfDefine, like this: --- LoadModule php4_module libexec/apache/libphp4.so LoadModule ssl_module libexec/apache/libssl.so --- 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