php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program
I am trying to install and setup Laravel 4 through the Git Shell using this tutorial:
It all seems to be working until I have to run
php artisan key:generate at which point it gives me the error:
php : The term ‘php’ is not recognized as the name of a cmdlet, function, script file, or operable program
I have hunted around and am not sure how to go about setting this up so it recognizes PHP.
Does anyone have any ideas or know of a thorough tutorial to get Laravel 4 setup?
One Solution collect form web for “php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program”
Try adding your
PHP.exe‘s folder to your
System PATH variables, so PHP can be accessed via terminal.
To add new
PATH variable, follow this:
- Right click on
My Computer, select
Advanced System Settings
- In the
System Properties windowclick the
Environment Variables button.
System Variables -> PATHand click Edit.
- Enter the folder where your
If you did this correctly, restart your terminal and type
php --version to check if it works.
Note: Don’t forget to seperate paths by using