Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

xampp php folder screenshot

share|improve this question

migrated from stackoverflow.com Mar 13 '13 at 2:15

This question came from our site for professional and enthusiast programmers.

2  
Check if php.exe is in `C:\xampp\php` or some subfolder there –  Marko D Mar 12 '13 at 22:28
    
Pretty sure it's there. Added a screenshot. –  Zubzob Mar 12 '13 at 22:38
    
Reopen your cmd window after you have added the path, then the change will have an effect –  Michel Feldheim Mar 12 '13 at 22:44
    
I think you need to restart the computer to take effect the changes you have made in path. –  Sheikh Heera Mar 12 '13 at 22:47
1  
Try 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 run php 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 Mar 13 '13 at 3:31
show 8 more comments

1 Answer

up vote 1 down vote accepted

It works now. The problem was that extra slash at the end (in the PATH environment variable).

I tried with:

C:\Program Files\TortoiseGit\bin;C:\xampp\php\

but it didn't work, then with

C:\Program Files\TortoiseGit\bin; C:\xampp\php

but it didn't work also (notice the extra space before 'C:..').

Eventually,

C:\Program Files\TortoiseGit\bin;C:\xampp\php

did the trick.

share|improve this answer
    
Still doesn't work for me :( Any other tips? –  Enke Sep 17 '13 at 14:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.