Mac Apache not starting because of PHP standard module

If you have a problem with Apache not starting although there’s no error log entry (and sudo apachectl configtest also doesn’t help), try
sudo apachectl -X
That way the debug mode is enabled and you get to see every problem that prevents Apache from starting. Even if it’s a PHP warning that is caused by the standard PHP module:
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20160303/' - dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20160303/, 9): Library not loaded: /usr/local/php5/lib/libcurl.4.dylib

If you encounter that warning / error, comment the php5_module line out (to find in /etc/apache2/httpd.conf):
#LoadModule php5_module libexec/apache2/

Februar 24th, 2017