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.

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

share|improve this question

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

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

add comment

1 Answer

up vote 0 down vote accepted

In your .bashrc

export PATH=/usr/bin:$PATH
share|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
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.