I have installed MAMP (comes with PHP 5.5) on my machine. And localhost pointed to /Applications/MAMP/htdocs. The problem happened when I was trying to use composer in terminal to install dependencies in htdocs. Composer complained that PHP must be 5.4 or above.
I guess it complained about PHP comes with OSX. So I have upgraded PHP to 5.6 by
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
But when I do
$ php -v
I still get
PHP 5.3.28 (cli) (built: Aug 29 2014 18:52:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
And Composer is still complaining...
Why is that? And how to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…