Note install apache22 first if required.
cd /usr/ports/lang/php5
make install
tick Build Apache Module
vi /usr/local/etc/apache22/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Start apache 1.3
/usr/local/etc/rc.d/apache start
or
Start apache22
/usr/local/etc/rc.d/apache22 restart
Default data directory for apache22
/usr/local/www/apache22/data
Default data directory for apache 1.3
/usr/local/www/data