php composer.phar install from git bash CLI and it shows sh:php: Command not found.
Though I have set environment variable path to my wamp/bin/php/php5.4.16/
You are required to put the directory that has php.exe in your WAMP installation into environment variable PATH. It is generally like C:\wamp\bin\php.
Where \php\ is the directory containing php.exe.
- Set php env. variable as mentioned here. (you can test it easily using this command:
php -r "echo 1;"or
- restart git shell
if composer.phar does not exists, run this (more info):
php -r "readfile('https://getcomposer.org/installer');" | php
php composer.phar installfinally
Run php without git shell:
- Hold SHIFT and click with right mousebutton on folder
Open command prompt window here
- run any php command like
Whether you are using gitbash or cmd you should run it as an administrator. Navigate to your project then type the command “composer install” it will work. Mine worked just fine.