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.

I have php installed along with XAMPP. I can run php cli by typing /opt/lampp/bin/php -arguments-here, but I understand there must be a way to register a proper short command php -arguments-here ?

Edit: I edited .bash_profile as per answer below, but I still keep getting the error:

The program 'php' is currently not installed. You can install it by typing: sudo apt-get install php5-cli

share|improve this question
add comment

2 Answers

After doing what BetaRide suggested, you can make the change happen in your current shell session by executing:

. ~/.bash_profile

Now, the environment variable $PATH has the value you just assigned to it.

share|improve this answer
    
still nothing :( the same error about php5-cli being not installed... –  Sejanus Apr 7 '11 at 7:00
    
do: "echo $PATH" in the shell, you should have a "/opt/lampp/bin/" within it, do you? –  kmels Apr 7 '11 at 22:43
add comment

Put /opt/lampp/bin in your path.

Add the following lines to your .bash_profile (assuming you have a bash shell):

PATH=/opt/lampp/bin:$PATH
export PATH
share|improve this answer
    
you just rephrased my question :) How can I do that? –  Sejanus Apr 6 '11 at 5:19
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.