skip to Main Content

I would like to upgrade my PHP from 7.2 to 7.3 on my Mac Mojave.

My current version is 7.2.25 (when I execute php -v).

I did that:

brew install [email protected]

It seems that it installed some things. But php -v still displays 7.2.25.

I restarted my computer, and still get the same. What more can I do?

2

Answers


  1. need to own /usr/local/optif you face any problem to unlink or link.

    sudo chown -R `whoami`:admin /usr/local/opt
    

    brew unlink [email protected] && brew link --force --overwrite [email protected] after running this command close all terminal and open fresh terminal to see reflection.

    To change active version with Apache,in file /usr/local/etc/httpd/httpd.conf
    load your desired php module. Commented php7.2 and added php7.3

    #LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
    LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
    
    Login or Signup to reply.
  2. You can try to run either of the following commands

    brew install [email protected]
    

    OR

    curl -s http://php-osx.liip.ch/install.sh | bash -s 7.3
    

    And The last step is

    export PATH=/usr/local/php5/bin:$PATH
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search