Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I type which php I get

/Applications/MAMP/bin/php/php5.3.6/bin/php

If I type where php I get

/Applications/MAMP/bin/php/php5.3.6/bin/php
/usr/bin/php

And that's fine, but I am trying to remove the /Applications/MAMP/bin/php/php5.3.6/bin/php so it uses the one in /usr/bin/php but I cannot find out where that is being added? I checked all my .bash* files and .profile files and nothing could be found. Is there a way to find out why the command php is using x package vs y? Like something to say in your blah file you have a symlink or you missed X source file?

share|improve this question

closed as off topic by Zoredache, rnxrx, Magellan, Scott Pack, Michael Hampton Oct 13 '12 at 23:39

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Which directories are searched for binaries is defined by the PATH environment variable.

Besides the files in your home directory, On Mac OS X you might want to check:

  • /etc/launchd.conf
  • /etc/profile
  • /etc/bashrc
  • /etc/paths
  • /etc/csh.rc
  • /etc/environment.plist

A grep for parts of the path string in /etc/* and ~/.* might reveal a hint.

share|improve this answer
    
Ended up being in .zshrc +_+ –  Steven Oct 11 '12 at 19:51

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