‘php.exe’ is not recognized as an internal or external command, operable program or batch file.
Why does that error occur even though
This happened to me and I found why.
Xampp can't run properly depending on your UAC settings.
Try to do this:
Log in as administrator (running cmd.exe as administrator isn't enough)
Execute cmd.exe or equivalent
type php -version