views:

20

answers:

2

Hi

i am trying to setup a new symfony framework project on ubuntu by following the documentation. But all the commands mentioned in the docs starting with 'php' give out the following error.

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

But php is installed and running on the system! How do i get past this error ?

Thanks in advance.

+5  A: 

There are several different PHP packages; probably the one that is installed is the PHP module for Apache, not the command-line (CLI) version invoked as php.

Just run the command like it says, and you should be fine.

Thomas
Thanks it worked now.
naiquevin
A: 

Is php on your path? (does it start if you just type in 'php' at the prompt or do you need to specify a path?)

If so, then its possible that the path is hardcoded to look elsewhere for your PHP executable. Try grepping the scripts to see where its looking.

If php is NOT on your path then try adding it, e.g. if php is in /usr/local/bin (and /usr/local/bin is not currently on your path)

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

HTH

C.

symcbean