Updating php version on mac

后端 未结 8 1684
旧巷少年郎
旧巷少年郎 2020-12-15 04:21

I want to update php version, currently I have 5.5.38 and I want 7.1

What I tried so far is using this command:

curl -s https://php-osx.liip.ch/insta         


        
8条回答
  •  余生分开走
    2020-12-15 04:55

    In case you guys run all install commands above but when checking the PHP version, it is still linking to the old version. So you guys may want to update the PATH.

    In my case, I open the .bash_profile which located in HOME directory by command:

    nano ~/.bash_profile
    

    Then, I add the path to the new version of PHP:

    PATH=/usr/local/Cellar/php/7.4.4/bin:
    

    Finally, run source ~/.bash_profile command to refresh the terminal window and checking the PHP version again.

    Hope this helps.

提交回复
热议问题