OSX El Capitan Constantly Changes PHP Version

I installed PHP 7.0 from here http://php-osx.liip.ch/ and followed the instructions to add a new php to mine $PATH, but in the new terminal window php -vstill shows the old version by default.

The new version is used if I source .profileor source .bash_profile(tried both)

I even added a new PHP path to mine .bashrc, but still no luck.

How can I make my mac always use the new version of PHP by default?

Note: Symink is not an option, as I am on El Capitan.

~ / .bashrc

export PATH=/usr/local/php5/bin:$PATH
export PATH=/usr/local/bin:$PATH
export PATH=$HOME/.composer/vendor/bin:$PATH
+4
source share
1 answer

~/.bash_profile ~/.bashrc Mac.

source ~/.bash_profile , , . zsh, source ~/.bash_profile ~/.zshrc .

brew .

+4

Source: https://habr.com/ru/post/1653851/


All Articles