Closed zietbukuel closed 6 years ago
Hey @zietbukuel, in case this helps, I fixed clamp
for me, with PHP 7, with this temporary hack.
@alanfluff It still fails with the same message. /usr/libexec/apache2/libphp7.so
doesn't even exists in my system. Mine is in /usr/local/opt/php71/libexec/apache2/libphp7.so
Sorry to hear that @zietbukuel :/
@zietbukuel mpm_prefork_module
defines a way how apache handles request. There are other modules, which you can choose from (e.g. mpm_worker_module
or mpm_event_module
). The php7 module seems to require mpm_prefork_module
. Can you run the following command:
find . -iname "*prefork*.so" 2> /dev/null
Does this yield any output?
Thanks @rqelibari but I'm not sure what would that be a problem because $(brew --prefix php71)
get's translated to /usr/local/opt/php71
. I tried it anyway, but it still fails. Thanks again for your suggestion.
After some investigation I found the cause of the error.
As the error message states, Apache complains about a missing mpm module. The usual solution would be to add a line like LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
to the configuration file.
In the case of clamp
this is not sufficient though as there is also another problem.
clamp
uses the lower case -c
option of the httpd
binary to provide the options on the command line. The the lower case -c
option loads the configuration provided at the last stage of configuration of Apache.
But the mpm_*_module
needs to be loaded at one of the earlier stages e.g. by providing it with the upper case -C
option.
As this is a rather special use case, the solution will be to add a new line in the options section of clamp.json
.
So just add "\" -C \"loadmodule mpm_prefork_module": "$(brew --prefix httpd)/lib/httpd/modules/mod_mpm_prefork.so"
above the usual loadmodule
key:
"group": "somegroup",
"\" -C \"loadmodule mpm_prefork_module": "$(brew --prefix httpd)/lib/httpd/modules/mod_mpm_prefork.so",
"loadmodule": {
"...": "..."
},
I can't get clamp to work after updating PHP to 7.1. I'm a bit lost here so any help is appreciated.
This is my
clamp.json
file:Even if I add this line to my
clamp.json
file it still complains about an MPM module not being loaded:"mpm_prefork_module": "$(brew --prefix httpd)/lib/httpd/modules/mod_mpm_prefork.so",
As you can see, I've installed apache with homebrew because I need PHP 7 but I don't want to upgrade my Mac yet.