Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2016 04:20:44 +0000
From:      Cary <cary@SDF.ORG>
To:        freebsd-questions@freebsd.org
Subject:   Re: Install PHP module in Apache24
Message-ID:  <20160310042044.GA13982@SDF.ORG>
In-Reply-To: <20160310012923.GA93705@potato.growveg.org>
References:  <BLU436-SMTP248619DAAE0E8D23E05BE3080B40@phx.gbl> <20160310012923.GA93705@potato.growveg.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 10, 2016 at 01:29:23AM +0000, John wrote:
> On Wed, Mar 09, 2016 at 07:38:06PM -0500, Carmel wrote:
> >I am building a brand new server. I installed Apache24 and php56;
> >however, the PHP module was not installed in Apache. What am I doing
> >wrong? Should I choose the "Build Embedded Library" option? I remember
> >a long time ago there was an option to build the apache module, but I
> >do not see that now.
> 
> Hi,
> 
> I think that these days, rather than building the php apache module in
> apache, one builds it in php. It'll be visible (if I remember
> correctly, it's one of the options in make config) if yuou're building
> either php or php extensions from the ports.
> 
> Also, just because it's built, it doesn't mean apache can use it - it
> has to be enabled in the httpd config.
> 
> [1] might be wrong though, it's been a few years.
> -- 
> John _______________________________________________

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-apache.html

Hi,
Be sure to read section 28.8.3.3 of the FreeBSD handbook.

Also note the pkg-message for www/mod_php56.
here is output of "pkg info -D mod_php56"  ->

Always:
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

***************************************************************

-
good luck

-- 
cary@sdf.org
SDF Public Access UNIX System - http://sdf.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160310042044.GA13982>