From owner-freebsd-questions@FreeBSD.ORG Mon Nov 15 20:32:56 2004 Return-Path: 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 4113416A4CE for ; Mon, 15 Nov 2004 20:32:56 +0000 (GMT) Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id E361743D39 for ; Mon, 15 Nov 2004 20:32:55 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [69.27.131.0] ([69.27.131.0]) by ns1.tiadon.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 15 Nov 2004 14:29:21 -0600 Message-ID: <4199127E.6060302@daleco.biz> Date: Mon, 15 Nov 2004 14:33:02 -0600 From: "Kevin D. Kinsey, DaleCo, S.P." User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041023 X-Accept-Language: en-us, en MIME-Version: 1.0 To: junkmail@sensewave.com References: <20041115115631.GA2804@tyven.la3sg.net> <4198D750.5090506@daleco.biz> <20041115201113.GA4855@tyven.la3sg.net> In-Reply-To: <20041115201113.GA4855@tyven.la3sg.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Nov 2004 20:29:21.0983 (UTC) FILETIME=[CA49A4F0:01C4CB51] cc: freebsd-questions@freebsd.org Subject: Re: How do I 'activate' mod_php5? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 20:32:56 -0000 Kjell Midtseter wrote: >On Monday, 15 November 2004 at 10:20:32 -0600, Kevin D. Kinsey, DaleCo, S.P. wrote: > > >>Kjell Midtseter wrote: >> >> >> >>>After installing lang/php4-extensions with apache13, >>>I can start using embedded php in my web pages right away. >>>When installing lang/php5-extensions, the embedded php >>>is passed as if it were html without being interpreted. >>>Any initialization required fro php5? >>>The required modules seems to be in place in httpd.conf >>>I get the same results when I make a new clean and cvsup'ed install from >>>the 5.3R CD Kjell >>> >>> >>The procedure is the same for PHP5 as it was for PHP4, >>with no variations *that I have noticed*. >> >>So, the first question ... have you added/modified/created >>the necessary AddModule, LoadModule, and AddHandler >>(or is it AddType?) lines in your httpd.conf? >> >> >> >What I have done is: >1) Loaded a system from the 5.3R CD, cvsup'ed and built world etc, >cvsup'ed ports and upgraded. Then installed lang4-extensions/apache13 >2) Repeated 1) on a second box, but installing lang5-extensions/apache13 >3) Repeated 1) on the second box, but installing lang5-extensions/apache2 > >Used the same options in all 3 cases. (slight diffs in the apache2 case) > >1) works as always. I find >LoadModule php4_module libexec/apache/libphp4.so >AddModule mod_php4.c >in httpd.conf (No need to add anything) > >2) does not work. I find >LoadModule php5_module libexec/apache/libphp5.so >AddModule mod_php5.c >in httpd.conf > >3) does not work. I find >LoadModule php5_module libexec/apache2/libphp5.so >in httpd.conf (no AddModule) > > > Thanks for the detailed reply. If the issue is really that you are seeing PHP source instead of the server "handling" the PHP code, then most likely it is the "AddType" directive that is wrong/missing/etc. Here is that section of httpd.conf from a working PHP4 installation: AddType application/x-httpd-php3 .php3 .html AddType application/x-httpd-php3-source .php3s AddType application/x-httpd-php .php .html .asp .php3 AddType application/x-httpd-php-source .phps In this case, we use PHP to interpret everything as the server is low traffic and we use PHP in docs that are saved as *.html as well (I think we added *.asp as a jibe at M$ ....) At the moment I've no shell at the PHP5 box, but I must assume it's the same there. Kevin Kinsey