Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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