PHP Is Not Recognized as an Internal or External Command in Command Prompt

PHP is not recognized as an internal or external command in command prompt

Add C:\xampp\php to your PATH environment variable.(My Computer->properties -> Advanced system setting-> Environment Variables->path (click on edit))

Then close your command prompt and restart again.

Note: It's very important to close your command prompt and restart again otherwise changes will not be reflected.

php is not recognized as an internal or external command' even though path is set

Try the following :

  1. Before setting the path in your environment variables, test the command directly by navigating to the folder from your command prompt then execute the command .

  2. If the command is working, add the path to your environment variables and restart your computer. Open the command prompt as an administrator by right clicking the command prompt.

  3. Ensure you open the command prompt as an administrator.

Hope this help

php is not recognized as an internal or external command (windows 7)

It works now. The problem was that extra slash at the end (in the PATH environment variable).

I tried with:

C:\Program Files\TortoiseGit\bin;C:\xampp\php\

but it didn't work, then with

C:\Program Files\TortoiseGit\bin; C:\xampp\php

but it didn't work also (notice the extra space before 'C:..').

Eventually,

C:\Program Files\TortoiseGit\bin;C:\xampp\php

did the trick.

php is not recognized as an internal or external command using xampp

When adding an entry to environment variables make sure you leave no spaces between the semicolon and the new path.

I spent a couple of hours going over my steps until I realized that the only difference between other path entries and mine was a single empty space. So i changed it and tried again at the command window (no need to log off and back on) and it worked!

I realize this was asked a while ago but since I found myself looking for a solution i figured this might be helpful to other people too.

WAMP: 'php' is not recognized as an internal or external command operable program or batch file although adding PATH

I don't really understand what you mean with Windows 10 displaying %20 but error message says you don't have any php program in PATH and that's the exact problem. Path directories are not case sensitive (that's how Windows is designed to work) but spaces do matter:

C:\>PATH C:\WINDOWS;C:\PHP

C:\>php -v
PHP 5.6.15 (cli) (built: Oct 29 2015 12:40:36)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

C:\>PATH C:\WINDOWS; C:\PHP

C:\>php -v
"php" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

C:\>PATH C:\PHP ;C:\WINDOWS

C:\>php -v
"php" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

Even if Windows 10 had changed PATH handling to fix some common errors (something I can't test right now) I think it's simpler to just type the right path verbatim.

Error :- php is not recognised as an internal or external command

PHP is not included in your PATH.
Right click your My Computer, then Properties, Advanced System Settings, Environment Variables and then find PATH variable, add your PHP installation dir there. Close your previously launched CMDs, re-launch it, it should work now.



Related Topics



Leave a reply



Submit