I'm running 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/
Asked
Active
Viewed 3.8k times
7

Prajan Karmacharya
- 373
- 1
- 4
- 13
3 Answers
10
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.

lnepal
- 549
- 8
- 20
6
- Set php env. variable as mentioned here. (you can test it easily using this command:
php -r "echo 1;"
orphp -v
) - restart git shell
if composer.phar does not exists, run this (more info):
php -r "readfile('https://getcomposer.org/installer');" | php
run
php composer.phar install
finally
Run php without git shell:
- Locate
C:\wamp\bin\php
- Hold SHIFT and click with right mousebutton on folder
phpX.Y.ZZ
- Select
Open command prompt window here
- run any php command like
php parameters

Community
- 1
- 1
-4
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.

MIshi
- 1