Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

windows

cmd

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?

like image 476
sf_tristanb Avatar asked May 27 '10 12:05

sf_tristanb


People also ask

How to fix “PHP is not recognized as an internal command” error?

If you have already installed Wampserver or Xamp, but you still get this error “PHP is not recognized as an internal or external command” in Command prompt or windows power shell, composer, etc. Try below method to solve this error. Just copy your php location on your Wamp or Xamp. On your Windows Start Menu, ‘search for Enviorment variables’

Is 'PHP' an internal or external command?

'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? phpwindowscmd Share Improve this question

How to execute PHP command through command line interface?

Before executing php command through command line interface you need to add php directory to windows system variables path using a semicolon. Click on Start Menu => Right click on My Computer and select properties.

How to add PHP to system variables in Windows?

Step 1: Click on Start menu from windows Operating System and search for Environment Variables and then click on Environment Variables System variables – If we add a path in system variables then other system users also use the PHP though command line.


1 Answers

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

like image 70
halfdan Avatar answered Oct 31 '22 19:10

halfdan