I also got the following error when I run a command with PHP
, I did the solution like that:
- From the desktop, right-click the Computer icon.
- Choose Properties from the context menu.
- Click the Advanced system settings link.
- Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
- In the Edit System Variable window, Add
C:\xampp\php
to your PATH Environment Variable.
Very important note: restart command prompt