Big Sur Macbook — I installed PHP v7.4 using Homebrew, and Apache gave an error message that PHP was not signed. So I followed the steps in this article explaining how to create a certificate authority and code signing certificate in Keychain Access. It worked once, but now I keep getting this error:
[Mon Oct 25 23:37:21.877634 2021] [so:error] [pid 3007] /usr/bin/codesign failed; unable to obtain code signature for module
[Mon Oct 25 23:37:21.877668 2021] [so:warn] [pid 3007] AH06663: Unable to find code signature authority on module at /usr/local/opt/php@7.4/lib/httpd/modules/libphp7.so that matches authority name "My Name" configured on LoadModule directive. Proceeding with loading process, but this will be an error condition in a future version of macOS.
Failed loading /usr/local/opt/php@7.4/lib/php/20190902/opcache.so: dlopen(/usr/local/opt/php@7.4/lib/php/20190902/opcache.so, 9): no suitable image found. Did find:
/usr/local/opt/php@7.4/lib/php/20190902/opcache.so: code signature in (/usr/local/opt/php@7.4/lib/php/20190902/opcache.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/opt/php@7.4/lib/php/20190902/opcache.so: stat() failed with errno=22
[Mon Oct 25 23:37:21.925733 2021] [mpm_prefork:notice] [pid 3007] AH00163: Apache/2.4.48 (Unix) PHP/7.4.25 configured -- resuming normal operations
[Mon Oct 25 23:37:21.925784 2021] [core:notice] [pid 3007] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Oct 25 23:45:01.160927 2021] [mpm_prefork:notice] [pid 3007] AH00169: caught SIGTERM, shutting down
Also, VS Code has started to demand all of my CPU power, but only when I'm looking at the root folder. If I start at the /etc or /var folder it's fine. What's going on? How can I troubleshoot and fix this?