I'm trying to update where the command line gets the location of the php binary:

webserver: /usr/bin

cli: /opt/local/bin/php

Where can I edit so when I do 'which php' it shows me /usr/bin/php

link|improve this question
feedback

migrated from stackoverflow.com Sep 23 '11 at 22:37

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

In your .bashrc

export PATH=/usr/bin:$PATH
link|improve this answer
Didn't change. I logged in as my normal user and was at the home directory, did nano .bashrc and added the above line (file was empty) I also checked .bash_profile and it had export PATH=$PATH:/usr/bin:(other paths here) – rschmitty Sep 22 '11 at 23:47
Remove the .bashrc change, and edit your .bash_profile instead so that /usr/bin is first. – suihock Sep 23 '11 at 0:07
feedback

Your Answer

 
or
required, but never shown

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