Date: Mon, 15 Nov 2004 22:08:44 +0100 From: Kjell Midtseter <junkmail@sensewave.com> To: "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz> Cc: freebsd-questions@freebsd.org Subject: Re: How do I 'activate' mod_php5? Message-ID: <20041115210844.GC4855@tyven.la3sg.net> In-Reply-To: <4199127E.6060302@daleco.biz> References: <20041115115631.GA2804@tyven.la3sg.net> <4198D750.5090506@daleco.biz> <20041115201113.GA4855@tyven.la3sg.net> <4199127E.6060302@daleco.biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 15 November 2004 at 14:33:02 -0600, Kevin D. Kinsey, DaleCo, S.P. wrote: > 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) > > > > > > > <snipped Index options> > <snipped more of my last> > > 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: > > <IfModule mod_php3.c> > AddType application/x-httpd-php3 .php3 .html > AddType application/x-httpd-php3-source .php3s > </IfModule> > <IfModule mod_php4.c> > AddType application/x-httpd-php .php .html .asp .php3 > AddType application/x-httpd-php-source .phps > </IfModule> > I inserted the following into the httpd.conf file for php5/apache2 <IfModule mod_php3.c> AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .php3s </IfModule> <IfModule mod_php5.c> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps </IfModule> and now the server is interpreting the php code!!!!!!! ...-.- de Kjell =============== > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041115210844.GC4855>