Reputation: 35
I'm trying to set some windows environment variables. But for some reason after saving my variable it still can't be used in cmd.
The error I keep getting:
'D:\xampp\php\' is not recognized as an internal or external command, operable
program or batch file.
I used the Browse File... button to select the php.exe
application just to make sure I didn't make any typos. Also I tried to change the value to D:\xampp\php\
this didn't work either.
Restarting windows didn't help. Also typing just D:\xampp\php\php.exe
works fine.
Does anyone have an idea what I'm doing wrong here?
Upvotes: 1
Views: 3614
Reputation: 136880
If you want to use php
without specifying its full path you should modify %PATH%
(or create a new %PATH%
user variable):
D:\xampp\php;%PATH%
%PATH%
tells the operating system which directories to search when you try to run things. Make sure to log out and back in after changing this variable.
See also https://superuser.com/q/317631/312289
Upvotes: 2