Problems w/ Monterey, macOS 12
USB-C Adapters May Stop Working
Some USB-C adapters stops working.
E.g. our QacQocGN30H doesn’t work properly any longer – Ethernet port is no longer recognized.
PHP Interpreter Removed (!), and Different Location if Install
Example, running into problems
mbp17:~ $ searchtest.sh.php
-bash: /Users/.../Dropbox/Office/bin/searchtest.sh.php: /usr/bin/php: bad interpreter: No such file or directory
- “PHP has been removed in macOS Monterey.”
- “This is a giant step backwards. One of the nice things about macOS is the built in apache including PHP. Please reconsider this.” – Fully agree!
This is sad, that macOS out of the box is now less MAMP (~LAMP) and will
- REQUIRE fixing for anyone that has previously been using his/her Mac for xAMP development. Something J&P Group has done for more than ten years……
- Download interpreter,
- Likely fix with assumed location for interpreter, use both in terminal and through web server
(1) Run the following to install (and grab a coffee, it takes time, also over giga-service):
brew install php
Results, after an installation (Dec 2021)
mbp17:~ $ php --version
PHP 8.1.0 (cli) (built: Nov 28 2021 01:44:44) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies
mbp17:~ $ which php
NOTE (why say ‘Partial’ in section header): This installs php in /usr/local/bin/, whereas earlier macOS has had it default in /usr/bin/.
I.e., must either
- Change scripts / use of interpreter to using /usr/local/bin/php,
- Try create a symbolic link /usr/bin/php.
The latter is actually quite complicated! Due to also increase security measures in macOS, System Integrity Protection (SIP) which disallows any
sudo ln -s /usr/local/bin/php /usr/bin/php. More below in own section.
More, General, PHP-Related
System Integrity Protection (SIP)
“It’s also possible to disable System Integrity Protection, but it’s generally best to leave it on and do customization in more appropriate locations. An Apple Stack Exchange question has more details on this: What is the Rootless Feature in El-Captain, really?.”