Following this guide: How to sign homebrew PHP module in macOS

I'm stuck on step five:

Locate location or path of PHP module from Apache's PHP LoadModule directive.

$ grep -nir "^loadmodule.*php" /etc/apache2
/etc/apache2/other/00-httpd.conf:4:LoadModule php7_module >/opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp7.so

I keep running into the error:

zsh: no such file or directory: /etc/apache2/other/00->httpd.conf:4:LoadModule

I've located my install of PHP at the following path:

/usr/local/opt/[email protected]/8.1.0_3/lib/httpd/modules/libphp.so

But it seems to be some sort of error with /etc/apache2/other/00->httpd.conf - there doesn't even seem to be a httpd.conf file at that location.

Any ideas?

1 Answer 1


In case anyone on an Intel chip runs into the same problem, the way I solved this in the end:

  • Skip step 5

  • Go straight to step 6 and codesigning it at this location: >/usr/local/opt/[email protected]/lib/httpd/modules/libphp.so

  • Also: Nothing is generally located in the "other" folder, i.e.: /etc/apache2/other/00-httpd.conf

  • Instead use /etc/apache2/00-httpd.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .