Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .