Hi, so I was wondering since I am using macOS Monterey and as you know php is not included but local installs it in order for it to work. Well apparently that php install is only for local. Local installs it only for itself to use, and not systemwide. Because if I try a php command in terminal it doesn’t work as if it’s not installed. So am I wrong? Does Local install PHP systemwide and if it does how do I access it? If it’s not systemwide then I will need to install it to use it outside of local. If I do will that be a problem?Like I don’t want to duplicate install php and then have 2 phps, regardless if that will cause problems or not.
Hedy @stefanmz7
You may want to install PHP directly yourself at the OS level. This site walks you through the details.
Hey @stefanmz7 –
Local doesn’t install PHP in a system wide way, but you can probably configure things to use Local’s version of php.
When you click the “Open Site Shell” in Local, note that a script is run. Basically all that script is doing is setting some environment variables for that shell instance. Here’s a screenshot to help visualize:
You probably could mimic setting those variables in your shell to get things to work. Personally, that seems like more hassle than it’s worth, so following the link that @mikel shared is probably a better use of your time for installing a system level version of PHP using Homebrew.
Thanks to you and mikel! I don’t want to install home-brew or any other third party package managers. If I am installing php it will be with MacPorts. I hope that’s a different solution not a package manager. Can you please check it and tell me? But I think it’s different and if it’s not a package manager I am installing it this way.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.