The PHP detection logic in ports/lang/php4/bsd.php.mk works better than the one I have submitted as ports/43227 (rev 1.7 of Makefile). So utilize it. Fix: Apply the following patch
Responsible Changed From-To: freebsd-ports-bugs->ale I'll take it.
State Changed From-To: open->closed A slightly different patch has been committed, thanks!