sf_tristanb
sf_tristanb

Reputation: 8855

php is not recognized as an internal command (in Windows)

I want to develop using a framework called Symfony but I do not have a Mac and I don't want to dual boot with Debian.

I tried virtual hosts via Virtual Box but it doesn't work. So I decided to stay on Windows.

So when the tutorial tells me to do

php lib/vendor/symfony/data/bin/check_configuration.php

i do in the windows cmd :

php lib\vendor\symfony\data\bin\check_configuration.php

and it tells me:

'php' is not recognized as an internal or external command

I use UwAmp (php 5.2.12 + mysql + apache) which is stored in

E:\logiciels\UwAmp\

inside I have bunch of files, but I guess that is important:

E:\logiciels\UwAmp\apache\php_5.2.11

How to make the cmd PHP in the windows cmd work properly?

Upvotes: 12

Views: 30599

Answers (2)

halfdan
halfdan

Reputation: 34214

You need to add the path where the binary resides in to the PATH variable. You can do this on XP and Win 7 under the System -> User settings -> User variables

Upvotes: 4

Rob
Rob

Reputation: 1846

You'll have to add the directory in which the php executable is located to your "path" variable (I guess in your case that would be E:\logiciels\UwAmp\apache\php_5.2.11 ). In Windows, you can do that as described here: http://www.computerhope.com/issues/ch000549.htm

Any directory you place in this path variable (they're separated by a semicolon) will be automatically used in, for example, a cmd shell.

Upvotes: 16

Related Questions