After upgrading to MacOS Mojave, Apache can't load PHP extensions anymore. With any extension I get the error below on the Apache log; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
Is there any workaround that would not involve to disable MacOS's SIP?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find: //usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed. //usr/local/php/extensions/xdebug.so: stat() failed with errno=22
/etc/apache2/httpd.conf
the lineLoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in/etc/apache2/httpd.conf
uncomment line 545 that saysInclude /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.dispatcher-apache2.4-4.2.0.so