I migrated from a 2015 Macbook Pro to a Macbook Pro M1/Monterey.
I've not been able to successfully run PHP since. It is installed and the CLI works, but Apache2 continues to throw an architecture error.
Is there a version of PHP that will run on M1?
Thanks, Harry
How are you building PHP? Homebrew, MacPorts or ?
If Homebrew then you'll need to rebuild, codesign then update your apache config LoadModule with the new Homebrew path which changed for Apple Silicon (you might be trying to load an old Intel build from migrated Homebrew or Big Sur install)
LoadModule php_module /opt/homebrew/lib/httpd/modules/libphp.so "Apple Development: Name (ID)
You can check the architecture with lipo:
lipo -archs /opt/homebrew/lib/httpd/modules/libphp.so
arm64
Also check: