JamieCoy
2022-03-28 20:29:19 UTC
I am trying to use PHP 8.1 (from a Homebrew installation) on Mac OS Monterey alongside the built-in version of Apache 2.0
I understand the PHP module has to be codesigned and I’ve done that. Unless I’ve misunderstood, the name of the certificate needs to be added at the end of the LoadModule command in httpd.conf. Hence, I have entered it this way with James being the name of the certificate:
LoadModule libphp.so /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so James
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
When I run apacheconfig, I get this error:
Mon Mar 28 12:57:45.226774 2022] [so:notice] [pid 52143] AH06662: Allowing module loading process to continue for module at /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so because module signature matches authority "James" specified in LoadModule directive
httpd: Syntax error on line 191 of /private/etc/apache2/httpd.conf: Can't locate API module structure `libphp.so' in file /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so: dlsym(0x20392b0a0, libphp.so): symbol not found
The "dlysym" error is associate with my putting the name of the code signing certificate named James at the end of the module.
What am I doing wrong here? I have a feeling it’s something fairly simple.
Thank you
I understand the PHP module has to be codesigned and I’ve done that. Unless I’ve misunderstood, the name of the certificate needs to be added at the end of the LoadModule command in httpd.conf. Hence, I have entered it this way with James being the name of the certificate:
LoadModule libphp.so /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so James
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
When I run apacheconfig, I get this error:
Mon Mar 28 12:57:45.226774 2022] [so:notice] [pid 52143] AH06662: Allowing module loading process to continue for module at /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so because module signature matches authority "James" specified in LoadModule directive
httpd: Syntax error on line 191 of /private/etc/apache2/httpd.conf: Can't locate API module structure `libphp.so' in file /usr/local/opt/***@8.1/lib/httpd/modules/libphp.so: dlsym(0x20392b0a0, libphp.so): symbol not found
The "dlysym" error is associate with my putting the name of the code signing certificate named James at the end of the module.
What am I doing wrong here? I have a feeling it’s something fairly simple.
Thank you