Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I type which php I get


If I type where php I get


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 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.

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.