Reputation: 85
I add to global variable PATH
the path of the folder that contain php.exe
on a Windows machine (Windows U7 x64). But when I type in the console:
php -v
I'm getting:
'php' is not recognized as an internal or external command, operable program or batch file.
And if I type:
php.exe -v
It works:
PHP 5.5.10 (cli) (built: Mar May 2014 14:49:07) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
Upvotes: 1
Views: 433
Reputation: 49085
The environment variable PATH contains the list of folders to search for an application separated by semi-colons.
The environment variable PATHEXT contains also separated by semi-colons the file extensions valid for applications on search for an application if file name of application is specified on command line or in a batch file without file extension.
It looks like on your computer PATHEXT is not correct defined. Standard on Windows is:
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
Entering in a command prompt window set path
displays PATH and PATHEXT.
See also the remarks section on Microsoft documentation of command start.
Upvotes: 1