macOS 12.0 apache2 will not load module php7

Just installed macOS 12.0 . after configuring apache2 to include php7, I get this error from apachectl configtest.

[Mon Jun 07 16😮 6😮 9.626986 2021] [so:warn] [pid 3319] AH06665: No code signing authority for module at /usr/libexec/apache2/libphp7.so specified in LoadModule directive. Proceeding with loading process, but this will be an error condition in a future version of macOS.

httpd: Syntax error on line 187 of /private/etc/apache2/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/libexec/apache2/libphp7.so, 0x000A): tried: '/usr/libexec/apache2/libphp7.so' (no such file), '/usr/lib/libphp7.so' (no such file)

me too.

There are any solution?

thanks

Gatekeeper in macOS ensures only verified applications can be executed and this is achieved by signing the application using codesign. Code signing is mandatory in macOS Monterey.

PHP module installed using homebrew is not signed, so you need to sign it first before it can be used, or you will get the error

https://www.simplified.guide/macos/apache-php-homebrew-codesign

macOS 12.0 apache2 will not load module php7
 
 
Q