0

I am using the latest version of Git in bash and I am trying to execute basic commands e.g php. I have set the environment variable to C:\wamp\bin\php\php5.5.12 in Path.

However when I execute these basic commands nothing comes up, not even sh.exe: command not found. If you have any suggestions please let me know.

enter image description here

Emil Laine
  • 41,598
  • 9
  • 101
  • 157
NubmcNub
  • 105
  • 1
  • 11
  • What does your `PATH` environment variable looks like from inside mingw?. You might want to launch it again after having modify the path from your control panel – Bacon Aug 17 '15 at 00:43
  • I am not sure what is going on :( i re install wamp and now when i type php in git bash it just sits there and git just hangs thanks for the reply – NubmcNub Aug 17 '15 at 02:53

1 Answers1

1

You have to add an environment variable for php. Generally can I say: Gitbash have to know where your command is installed. For php, see below:

  • Right click My Computer
  • click Properties
  • go to Advanced System Settings left navigation
  • click on Environment Variables... button
  • go to System Variables below
  • select Path, click Edit and in the beginning of the path enter: C:\PathToYourPhpDir\bin; (Please note that in here you should indicate the php executable path. In case you installed php via e.g. the Windows installer).

Related question: Git Bash giving sh.exe: ruby: command not found

Community
  • 1
  • 1
schellingerht
  • 5,726
  • 2
  • 28
  • 56