Php is not recognized as an internal or external command operable program or batch file wamp

when I run PHP in CMD I get this error msg:

'php' is not recognized as an internal or external command operable program or batch file

the path was already added and I followed this tutorial:

http://perials.com/install-composer-on-windows-and-wamp/

C:\Program Files (x86)\Lenovo\FusionEngine;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Lenovo\Motion Control\;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\; C:\wamp\bin\php\php5.5.12; C:\wamp\www; C:\wamp\www\AKP\examples\AdWords\Auth;C:\Program Files (x86)\Skype\Phone\;C:\ProgramData\ComposerSetup\bin

Php is not recognized as an internal or external command operable program or batch file wamp

I created the file suggested in this post: Installing Composer globally for laravel usage?

and nothing.

Most of the posts I ran into solved the problem with adding the path - which doesn't solve mine.

I am currently using WAMP on Windows 10.

What can be the problem?

asked Mar 16, 2016 at 10:14

Php is not recognized as an internal or external command operable program or batch file wamp

ImnotapotatoImnotapotato

4,76310 gold badges71 silver badges140 bronze badges

4

PHP is not included in your PATH. Right click you're 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.

answered Sep 26, 2017 at 3:48

0

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.

answered Mar 16, 2016 at 11:28

Álvaro GonzálezÁlvaro González

137k38 gold badges254 silver badges340 bronze badges

4

if you are working with xampp then search for environment variable > click environment variable > system variable > PATH > edit > new > copy paste the location of xampp for windows C:\xampp\php then you can check php version with command php -v

answered Jun 3 at 10:18

Php is not recognized as an internal or external command operable program or batch file wamp

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.

That may be:

On Xamp: C:\xampp\php

On Wamp: C:\wamp\bin\php\php5.5.12 (version may change)

Php is not recognized as an internal or external command operable program or batch file wamp

On your Windows Start Menu, ‘search for Enviorment variables’

Php is not recognized as an internal or external command operable program or batch file wamp

  • On Environment Variables, Select Path
  • Edit Path

Php is not recognized as an internal or external command operable program or batch file wamp

On New button, add your path to php.

Php is not recognized as an internal or external command operable program or batch file wamp

OK.

How do you fix php is not recognized as an internal or external command?

If you are getting “php is not recognized as an internal or external command” from your Microsoft Windows Command Prompt on Windows 7, Windows 8, and Windows 10. Then you need to add php folder location path to the system environment variables.

How do you solve this error php is not recognized as an internal or external command operable program or batch file?

PHP is not recognized as an internal or external command in command prompt(windows 7/8) xampp.
Step 1 go to Advanced system setting..
Step 2 Update the path variable value..
Step 3 restart CMD..
Summary..
Related posts..

Where is php located in Wamp?

Installation on WAMP.
Extract the library from the archive to get the Phalcon DLL:.
Copy the file php_phalcon. ... .
Edit the php.ini file, it is located at C:\wamp\bin\php\php5.5.12\php.ini . ... .
Also edit the php.ini file, which is located at C:\wamp\bin\apache\apache2.4.9\bin\php.ini ..

Is not recognized as an internal or external command operable program or batch file?

You can resolve this issue in three ways: First, use the full path of the executable file to launch the program. Second, add the program path to Windows environment variables. Finally, move the files to the System32 folder.