Page 1 of 1

php -v not working

Posted: Tue Mar 12, 2013 10:48 am
by Hubertrum
I have installed php using sudo apt-get install php5

When I run php -v I get error message bash: php: command not found

Has my install run OK?

Re: php -v not working

Posted: Tue Mar 12, 2013 2:08 pm
by rpdom
You have installed PHP for a web server. That is fine if that is what you need to run.

If you want to be able to use PHP scripts from the command line, you need to install php5-cli. Then 'php -v' will work :)