2

I'm not sure why I'm still getting the PHP is not recognized as an internal or external command error. Here's my environment variables:

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\EgisTec MyWinLocker\x64;C:\Program Files (x86)\EgisTec MyWinLocker\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin; C:\PHP\;

My PHP.exe is located in "C:\PHP\", so I'm not sure why I'm getting this error. :/

1
  • If you're running it from Command Prompt, did you close the window and start another one after you added the environment variable? Commented May 26, 2012 at 16:34

2 Answers 2

2

I don't have a Windows machine to verify this, but I am pretty sure you cannot have spaces after the ; delimiters. Remove the space before C:\PHP, and it may be harmless, but also remove the trailing \.

C:\Program Files (x86)\NVIDIA Corporation\;...snip...;C:\strawberry\perl\bin;C:\PHP
-------------------------------------------------------------------------^^^^^

Depending on how you are launching PHP, you might need to log out of Windows and back in to propagate the new %PATH% through your environment, though I doubt that's necessary.

Sign up to request clarification or add additional context in comments.

Comments

0

Try only: C:\PHP (Without the last '\'). After this save the changes, restart your computer and write this on your cmd

php -v

to verify.

1 Comment

Thanks for the help, I did in fact have to restart my computer for the changes to work. Also, you can't have a space after the semi-colon for anyone else who encounters this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.