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 have just built PHP from source. Usually when I do this, I don't have any problems just running php from anywhere. This time however, the console returns 'command not found'. What do I need to correct for this to work properly?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

As you suspected by your subject, the PATH variable needs to be properly updated.

If you are using bash as your shell, this can be done in your personal ~/.bashrc file, or in the global /etc/profile or /etc/bashrc files for all users. You would add a line like this in either case:

PATH=$PATH:/path/to/php/directory/
share|improve this answer

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.