Reputation: 11
MacOS 12.1 After successfully installing php 8.1 with homebrew (along with apache/mySQL and phpmyadmin) I am trying unsuccessfully to install/link php 7.4. After following instructions to install, unlink, link, php -v returns 7.4 but phpinfo() shows 8.1. What am I doing wrong?
Upvotes: 1
Views: 2788
Reputation: 11
It looks as if I never successfully killed the included MacOS Apache. I uninstalled home-brew and the server was still running (with PHP8.1!). Not sure what went wrong.
Upvotes: 0
Reputation: 840
Strange enough, using a full name such as "shivammathur/php/[email protected]" for the link command is what worked for me.
Eg:
brew link --overwrite --force shivammathur/php/[email protected]
Also, don't forget to close your terminal completely and reopen it before checking the version with php -v.
Upvotes: 1