0

When running composer command like composer -v it shows

which: no php in (/c/Users/Vincent/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Vincent/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/nodejs:/c/Program Files/PuTTY:/c/xampp/php:/c/Program Files (x86)/instantclient_19_12:/c/composer:/cmd:/c/Users/Vincent/AppData/Local/Microsoft/WindowsApps:/c/Users/Vincent/AppData/Roaming/Composer/vendor/bin:/c/Program Files (x86)/instantclient_19_12:/c/xampp/php:/c/composer:/usr/bin/vendor_perl:/usr/bin/core_perl) /c/composer/composer: line 14: php: command not found

but it works when using CMD

Vincent Dapiton
  • 587
  • 1
  • 9
  • 27

1 Answers1

0

Add C:\xampp\php\php.exe to your Windows PATH.

Step by step:

Environment variables > User variables > Select PATH and press Edit > Add this path.
Oybek Odilov
  • 185
  • 9
  • don't think its Environment Variables coz its working in CMD and Powershell but checking in ENV, its already in the PATH – Vincent Dapiton Mar 19 '23 at 12:41
  • @VincentDapiton have you tried to reopen the terminal after updating Path? And maybe this would help https://stackoverflow.com/a/10764080/17652912. – Oybek Odilov Mar 19 '23 at 12:43