Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP command not found in my shell for windows 10 neither in git bash. I tried all the available solution from here

When I typed php in my command prompt, It results

C:\Users\samsung>php
'php' is not recognized as an internal or external command,
operable program or batch file.

I have installed xampp in my windows 10 and I haven't edited the php.ini file in the settings. Any help to enable this php command would be greatly appreciated because I am stock in my laravel composer setup due to this.

like image 406
Programmer Sishir Avatar asked Jun 22 '16 08:06

Programmer Sishir


3 Answers

If you are using windows:

  1. Open My Computer Properties
  2. Click on Advance System Setting
  3. Select Environment Variables
  4. Click on Path & Edit
  5. Click new & Add your PHP.exe path (e.g. C:\xampp\php\php.exe) As shown in the picture

then Restart

Detail Support available here

like image 96
Shirish Chaudhari Avatar answered Sep 19 '22 17:09

Shirish Chaudhari


You should add the php.exe path to PATH environment variable

http://php.net/manual/en/faq.installation.php#faq.installation.addtopath

like image 42
David Rojo Avatar answered Sep 18 '22 17:09

David Rojo


Install composer, during the installation process allow composer to add php to your path:

https://getcomposer.org/Composer-Setup.exe

like image 25
Hussain Wali Avatar answered Sep 16 '22 17:09

Hussain Wali