I have a problem in accessing the php command using command line. I also created a PATH in my environment variables.
The PATH is like this
C:\wamp\bin\php\php5.5.12
Now the console output is this
C:\Users\Web4>php
'php' is not recognized as an internal or external command,
operable program or batch file.
I also restarted the PC and the command console still same effect. I also created a batch for this still same effect too.
SET PATH=%PATH%;C:\wamp\bin\php\php5.5.12
Is there some configuration other than this? I am using wampserver.
If you run echo %PATH% and it does not include the path to WAMP, then the problem is simply that you haven't set it properly in your environmental variables.
The setting is located here: https://i.sstatic.net/xcHT9.png
Edit the System Variables "Path" field and prepend your path to WAMP (obviously make sure you have the exact path to the folder where php.exe is located). Then click OK until all the settings dialogs are closed.
Once you change the path, you will need to close your CMD window and open a new one. The path changes don't take effect on any open CMD windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With