4
1
I added php to the PATH environment var. Showing here my last three entries in the path input:
C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\xampp\php\
Somehow when I run php -v
in the cmd I still get the not recognized as an internal or external command error.
Any ideas on how should I fix this?
2Check if php.exe is in
C:\xampp\php\
or some subfolder there – None – 2013-03-12T22:28:15.917Pretty sure it's there. Added a screenshot. – None – 2013-03-12T22:38:42.703
Reopen your cmd window after you have added the path, then the change will have an effect – Michel Feldheim – 2013-03-12T22:44:51.553
I think you need to restart the computer to take effect the changes you have made in path. – The Alpha – 2013-03-12T22:47:52.010
I've restarted my PC multiple times after modifying the variable system with no luck. – None – 2013-03-12T22:49:15.510
restart will be needed or at last : http://www.nerdydork.com/update-windows-path-without-rebooting.html
– Robert – 2013-03-12T22:50:09.917have you tried to use "C:\xampp\php" instead of "C:\xampp\php" not sure if it makes anz difference under windows – Robert – 2013-03-12T22:51:43.640
Ugh, Windows was a long time ago here... perhaps the ending slash is frowned upon? – Wrikken – 2013-03-12T22:56:11.460
Tried id with both the ending slash and without it. Restarted it afterwards to be sure. Same result. This is getting really frustrating. – None – 2013-03-12T23:05:59.640
1Try replacing the path with only the
xampp
directory. You can do this in the command shell so there's no need to trash your computer's environment or restart. I assume you are trying to runphp
from the shell rather than the windows 'run' dialog. This might seem like a weird thing to ask, but does it work if you use an explict path:c:\xampp\php\php.exe -v
? – paddy – 2013-03-13T03:31:14.833Ending slash is not a problem with Win7 at least (by default PATH contains
C:\Windows\System32\WindowsPowerShell\v1.0\
), and a restart is most definitely not required! Only the command prompt window needs to be closed and reopened for the changes to take effect. – Karan – 2013-03-13T04:02:24.500@paddy: yes, that displays the php install info. But isn't the environment variable's purpose to allow me using 'php' command anywhere in cmd ? – Zubzob – 2013-03-13T09:05:47.470
@zubzob You only answered the least interesting part of my comment. Can you comment on the rest? We're trying to work out what's going on because there's not enough information in your question, or even your comments. My suggestions are not solutions - they are an attempt to isolate the issue. You need to state whether any assumptions we have made are true or false. – paddy – 2013-03-13T21:57:29.130