After installing all the required packages for apache and php, then working through the apparently common mpm worker prefork issues, another problem occurs.
When starting apache with
apachectl start
it appears to start with no errors showing on the terminal. But apache is not running.
I find this in apache's error_log:
Wed Jan 21 14:55:19 2026 (7942): Error Cannot create lock - Permission denied (13)"
In troubleshooting I discovered that if the php_module is enabled in httpd.conf the error occurs
LoadModule php_module libexec/apache2/libphp.so
If the php_module is not loaded
#LoadModule php_module libexec/apache2/libphp.so
apache starts and runs correctly, but of course without php capabilities. I've tried enabling/disabling the php_module in httpd.conf and the problem can be reproduced.
Any thoughts on how to fix this are greatly appreciated