Home > front end >  enable PHP in apache mac m1
enable PHP in apache mac m1

Time:02-24

I try to install php on a mac m1 working with apache,

brew install php

It looks fine in CLI

php -version PHP 8.1.2 (cli) (built: Jan 21 2022 04:34:05) (NTS)

So i try to load the module in the /etc/apache2/httpd.conf file like this :

LoadModule php_module /opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp.so

I try different paths but although I can reload apache without problem, I can't access an index.php page with php code in it, this is the only error messgae I ve got in error.log:

[pid 80745] AH00169: caught SIGTERM, shutting down

How can i fix this ?

CodePudding user response:

I have the same issue ... enter apachectl configtest on the terminal and you will get the error message : No code signing authority for module at /opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp.so specified in LoadModule directive. httpd: Syntax error on line 190 of /private/etc/apache2/httpd.conf: Code signing absent - not loading module at: /opt/homebrew/opt/[email protected]/lib/httpd/modules/libphp.so

  • Related