Solved Apache and PHP

Looking for advice on configuring PHP and Apache so that I can run PHP-based cgi scripts. I have installed Apache V2.4.35 and PHP 5.6. A later version of PHP would be OK.

A previous discussion on this topic doesn't seem to apply any more; there's no Apache configuration option shown in the list generated by the make config command.
 
That part was split off to its own port, which made it easier to package individually. So look for www/mod_php72 for example. There's a number of PHP versions to choose from, with 7.2 set as the default version.

Note that PHP 5.6 has been deprecated, it's EoL upstream, and it will be removed from the ports tree on 1 January.
 
Oh, www/mod_php72 is strictly speaking not CGI. If you really meant running PHP-CGI scripts lang/php72 should be enough, CGI is enabled by default. Your question and the thread you referred to isn't clear which of the two is actually required. But both appear to be satisfied with an embedded language module instead of actual, true, CGI. There are significant differences in the way these two are handled and set up.
 
Back
Top