Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

To use the right PHP version on my command line I want to change the $PATH of my command line profile.

For now, the command line uses the standard system php file located in /usr/bin/. I want to use the php file from my zend server ce located in /usr/local/zend/bin.

I added /usr/local/zend/bin already to my bash_profile but it doesn't work because when I print the $PATH variable, /usr/local/bin comes before /usr/local/zend/bin and the terminal will takes the first one.

My PATH:

/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/zend/bin:/usr/local/zend/mysql/bin:/opt/local/bin

I tried to update the .bash_profile file but it just include my 'zend' path's. Other path's look likes to set somewhere else or automatic?

Thanks in advance,

Nick

share|improve this question

migrated from stackoverflow.com Nov 29 '12 at 2:49

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

add comment

2 Answers

up vote 3 down vote accepted

Just prepend zend to your PATH

PATH=/usr/local/zend/bin:$PATH

Don't forget to reload or relogin.

share|improve this answer
add comment

Try as follows:

export PATH=/usr/local/zend/bin:$PATH
share|improve this answer
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.