I'm updating my question here, at the top, so anyone reading will encounter the latest unresolved issue first.
I was hasty in updating my question in response to Alex Narvey's advice.
The result of:
bash3.2/Users/jnorris$ codesign -dv --verbose=4 "/opt/homebrew/opt/php/lib/httpd/modules/libphp.so"
is what I have below with the exception of:
...
Authority=My Name's CA
...
not just:
...
Authority=My Name
...
When I set Line 187 of my https.conf
to:
LoadModule php8_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so "My Name's CA"
I get the error message:
bash3.2/Users/jnorris$ apachectl -config
[Mon Feb 21 17:26:12.913882 2022] [so:error] [pid 3892] AH06663: Unable to find code signature authority on module at /opt/homebrew/opt/php/lib/httpd/modules/libphp.so that matches authority name "P James Norris's CA" configured on LoadModule directive.
httpd: Syntax error on line 187 of /private/etc/apache2/httpd.conf: Code signing error - not loading module at: /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
I take it that My Name's CA
is a certificate that give me the authority to issue the signing certificate My Name
, but I don't know if this is correct, and why I'm getting the error message I'm getting now as opposed to below.
Again, any help anyone can give me will be greatly appreciated because if I don't get this resolved soon, I'm going to downgrade my server to Mac OS 11 Big Sur, and I'd really rather not do that.
=====
I recently upgraded my Mac mini (M1, 2020) to Mac OS Monterey (12.0.1) and discovered that I had to download and code sign PHP 8.1. Having not had to code sign PHP before, I followed the instructions at "How to future proof your apache modules in macOS by signing them with your own certificate authority"1. But when I run apachectl configtest
I get the following error message:
AH06663: Unable to find code signature authority on module at /opt/homebrew/opt/php/lib/httpd/modules/libphp.so that matches authority name "My Name" configured on LoadModule directive.
httpd: Syntax error on line 187 of /private/etc/apache2/httpd.conf: Code signing error - not loading module at: /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
This is what line 187 of my httpd.conf
looks like:
LoadModule php8_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so "my name"
I have confirmed that lib-up.so
exists at /opt/homebrew/opt/php/lib/httpd/modules/
.
Following Alex Narvey's advice, I:
bash3.2/Users/jnorris$ codesign -dv --verbose=4 "/opt/homebrew/opt/php/lib/httpd/modules/libphp.so"
Executable=/opt/homebrew/Cellar/php/8.1.1/lib/httpd/modules/libphp.so
Identifier=libphp
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=117087 flags=0x0(none) hashes=3654+2 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=721664
Hash type=sha256 size=32
CandidateCDHash xxxx
CandidateCDHashFull xxxx
Hash choices=sha256
CMSDigest=xxxx
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=13058048
Executable Segment flags=0x0
Page size=4096
CDHash=xxxx
Signature size=2064
Authority=***My Names's CA***
Signed Time=Dec 25, 2021 at 11:28:37 AM
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements count=1 size=84
where I have changed the hashes to xxxx
and my certificate name to My Name's CA
.
Line 187 of my https.conf
now reads:
LoadModule php8_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so "xxxx"
But I still get the error:
bash3.2/Users/jnorris$ apachectl configtest
[Mon Jan 24 07:38:09.095804 2022] [so:error] [pid 14290] AH06663: Unable to find code signature authority on module at /opt/homebrew/opt/php/lib/httpd/modules/libphp.so that matches authority name "xxxx" configured on LoadModule directive.
httpd: Syntax error on line 187 of /private/etc/apache2/httpd.conf: Code signing error - not loading module at: /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
I see someone has asked a similar question at "Unable to codesign PHP v7.4 with Apache on Big Sur"2, but that request for help has been up for 2 months with no replies and s/he is getting error messages that I am not.
Thanks for any help anyone can offer.