Apache22 + PHP5 installation issues

robert bsd at bathnetworks.com
Sat Jun 3 11:12:17 PDT 2006

Hi all,

I am having problems with setting up a web server. I'm running FreeBSD
6.1-Release-P1, updated of yesterday.

I have installed Apache22, php5 and php5-extensions from the ports. (I
did check the build Apache module option in the php5 config).

My first problem is that the handbook still refers the to mod_php which
is not available. A search of the archives gave me the answer that it
has been removed.

My httpd.conf has:

LoadModule php5_module        libexec/apache22/libphp5.so

To which I have added:

AddType application/x- httpd-php .php
AddType application/x- httpd-php-source .phps

As per the pkg-message.

The problem is that although I can connect to apache, php does not
appear to run, all I get in a browser is unknown file type and a
suggestion to download the file.

I have also tried adding index.php to the DirectoryIndex

I have to follow the handbook and tried this:

<IfModule php5_module>
        DirectoryIndex index.php index.html
<IfModule php5_module>
AddType application/x- httpd-php .php
AddType application/x- httpd-php-source .phps

ie with php5_module rather than mod_php, but that also fails to work

There is nothing in the apache-error.log nor messages that help.

Any ideas, suggestions please.


More information about the freebsd-questions mailing list