The name 'php' was not recognized as the name of a cmdlet, function, script file, or executable program."?
The name 'php' was not recognized as the name of a cmdlet, function, script file, or executable program." My terminal then displays this:
php : Die Benennung "php" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang. In Zeile:1 Zeichen:1 + php .\composer.phar require league/oauth2-client + ~~~ + CategoryInfo : ObjectNotFound: (php:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
when requesting
PS C:\xampp\htdocs\store> php .\composer.phar require league/oauth2-client
When you write a command in the command line, the program searches for a suitable application with this name in several locations. This includes, among other things, the current context (order) and the folders that are entered as a list in the PATH environment variable.
To edit the PATH environment variable, press the Windows button and search for Edit system environment variables. In the opening window, click on the button Environment variables and then search either in the upper (variables only for your user account) or lower list (variables for all user accounts) for the Path-Variable. You should get a new entry: The directory path in which your php.exe file is located (with you this would be C:\xampp\php).
Then confirm all windows and close all command line windows. Open a new command line and execute a test:
If the installed PHP version is returned to you, the above configuration was successful.