I have a question on how to make my Terminal command line interface on Mac to use MAMP's PHP and MySQL instead of what's already installed on my machine. I created a new file in my home directory called .bash_profile and I added this:

PATH=/Applications/MAMP/bin/php5/bin:\
/Applications/MAMP/Library/bin:$PATH
export PATH

Now when I type "which mysql" is shows correctly that it's using MAMP. But when I try "which php" it's still using the pre-installed Mac version. Any idea on how I can get it to use MAMP instead?

Thanks.

link|improve this question
feedback

1 Answer

Use hash -d php to tell bash to forget the location of the php binary.

link|improve this answer
It seems to pickup the same original PHP location again each time I start Terminal. – swt83 Jul 28 '10 at 20:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.