Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. – The Alpha 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
up vote 2 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
    
@Enke try adding full path C:\xampp\php\php.exe, This could be the problem/ – PHP Mentor Nov 20 '15 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .