How to sign homebrew PHP module in macOS

Ihttps://deezombiedude612.github.io/wp-labs/lamp_macos/

First you have to create Certificate Authority for codesignin and afterwards code signing signature with Key Chain Access.

Afterwards you have to sign PHP with the new generated keychain.

codesign --sign "your-authority-name" --force --keychain ~/Library/Keychains/login.keychain-db /opt/homebrew/opt/php/lib/httpd/modules/libphp.so

in the file httpd.conf you append the Authorityname of the generated certificate to the line of loading the PHP Module.

LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so "your-authority-name"

Test & Restart you apache server

sudo apachectl -t
sudo apachectl restart

Leave a Reply

Your email address will not be published.