You only have to create the symbolic link. The php5-core port/package gives the command to follow: From an older installation that I sometimes use to play with php:
Code:
$ pkg_info -M php5-core
Information for inst:php5-core-5.2.12p1
Install notice:
To enable the php5 module please create a symbolic
link from /var/www/conf/modules.sample/php5.conf
to /var/www/conf/modules/php5.conf.
ln -s /var/www/conf/modules.sample/php5.conf \
/var/www/conf/modules
The recommended php configuration has been installed
to /var/www/conf/php.ini.
After having created that symbolic link, placing the following simple php file in the DocumentRoot ( in my case /var/www/test) php just works
PHP Code:
<?php
$message = "A simple PHP test" ;
echo <<< EOF
<html>
<head>
<title>PHP test</title>
</head>
<body>
<h1>$message</h1>
<p>This is is a simple test for PHP</p>
</body>
</html>
EOF;
?>
Does the Apache error log give any clues?
If you are running
pf, please make sure the
pf.conf does not block port 80.