Activate PHP on macOS Monterrey #491
-
macOS Monterrey ships without PHP (it's been deprecated). I installed PHP from here using brew, but now I can't find how to activate PHP, it's not being interpreted, all I get is the code from PHP documents. I will appreciate some help. Thanks !! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
After installing php make sure you have linked the PHP version as documented in the README. Then check that the correct PHP version is installed by running If you are trying to run PHP with a web server like |
Beta Was this translation helpful? Give feedback.
-
What I found (it's my recommendation for every one), Is to go through this process after a clean macOS Big Sur installation, This one is the second time that I use this procedure, and in both cases, installing over a clean installation (before installing anything else), it worked perfectly ... What I would like to know now is if someone after finishing this process, has installed macOS Monterrey without losing the web server and/or PHP. |
Beta Was this translation helpful? Give feedback.
-
@shivammathur and @gemkev Thanks for your opinions. I did it. Thank you very much again. |
Beta Was this translation helpful? Give feedback.
After installing php make sure you have linked the PHP version as documented in the README.
https://github.com/shivammathur/homebrew-php#install-php
Then check that the correct PHP version is installed by running
php -v
in a new terminal.If you are trying to run PHP with a web server like
apache/httpd
. Make sure you have set it up correctly.This is a good guide for that: https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions