Nagios install stopped at PHP test

Hey all, I'm going to move my Nagios server over from a Debian server to a FreeBSD 9.0 server. I'm following the instructions on this page:

Code:
http://www.unixmen.com/how-to-install-and-configure-nagios-in-freebsd/

and I've made it down to here:

Code:
[B]11-Check  phpinfo page[/B]

Document root  starndart in apache  is    /usr/local/www/apache22/data
Add the code to the file test.hpecho “<? phpinfo(); ?>” >> /usr/local/www/apache22/data/test.php

I can't seem to get a successful test. There are a couple of typos on the page but I've done several attempts with what I think are logical "typo changes" but no joy. I've even put the

Code:
<? phpinfo(); ?>

in the file manually but when I navigate to it I just get a page with that text on it. I'm not an Apache or a PHP guy so I'm pretty much flying blind here. Can anyone see what I'm doing wrong so I can correct it and get on with my Nagios install?

Thanks,

Joe b
 
You need to add these to httpd.conf for PHP to work:
Code:
    # PHP5
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

You also need to build PHP from ports, the package doesn't contain the needed apache module.
 
Back
Top