Reputation:
Everytime I open my mac, the php version goes back to 7.0. I run the code
source ~/.bash_profile
to refresh it and goes to 7.2. Now when I open my mamp pro 4.3 with php7.2, my version goes back to 7.0 if I check it on terminal with php -v
this is my ~/.bash_profile:
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' export PATH=${PATH}:/usr/local/mysql/bin export PATH=~/.composer/vendor/bin:$PATH export PATH=/Applications/MAMP/bin/php/php7.2.1/bin:$PATH
Upvotes: 0
Views: 203
Reputation: 570
What about use brew? I remove the original php 7.1 from macOS 10.13 and upgrade it to 7.2. It's really simple manage the installed programs on Mac with brew, take a look: https://github.com/ibrunotome/macOS-switchblade/blob/master/install.sh
Upvotes: 1