skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search