Mac OS Mojave понизить версию PHP 7.3 до 7.2.14
Я установил PHP 7.2.14 с Brew.
brew install php@7.2
На CLI у меня уже есть версия 7.2.14, но не на Apache. Что мне делать, чтобы я мог удалить 7.3 с моего Mac и использовать только 7.2.14
2 ответа
тебе нужно бежать
brew link php@7.2
Чтобы принудительно установить ссылку и перезаписать все конфликтующие файлы:
brew link --overwrite php@7.2
Чтобы вывести список всех файлов, которые будут удалены:
brew link --overwrite --dry-run php@7.2
The PHP version in your CLI has nothing to do with the version you have on your Apache module.
You need to disable/enable the right modules in apache in order for the right php version to take affect.
For enabling/disabling a mod, you have this nice helper commands:
a2enmod <MOD_NAME> // Enable a mod
a2dismod <MOD_NAME> // Disable a mod
This one is not tested, but you should be able to do:
a2dismod php7.3
a2enmod php7.2
P.S
Not sure the apache helper commands are available in mac so you can do it directly through the httpd.conf
file.
checkout /etc/apache2/httpd.conf
and make sure the right modules are loaded.
Hope it helps. Good luck:)