'PHP' is Not Recognised in Command Line - Why ?

Hi - I want to use the command line with Laravel 4 artisan. Artisan works fine in the windows cmd. I have added php to the Development Envirtonment adn it comes up ion the external libraries.

But when I wish to execute the 'php artisan list' command inside the terminal I am getting an error: 'php' is not recognized as an internal or external command,

So what am I doing wrong ?

Many Thanks !


Hi there,

So far it sounds like shell/terminal/console is unable to find your php file in one o fthe PATH folders.

What OS do you have there? If Windows -- see what "PATH" command (actually, environment variable, to be precise) will show you. Is php.exe located in one of the folders listed there? If not -- try restarting.


Have you configure php.exe file path in environmental variables? This is the reason most of time "PHP is not recognized in command line" error occur. PLease look at this tutorial http://www.codeandtuts.com/php-is-not-recognized-as-an-internal-or-external-command/ 


Please sign in to leave a comment.