Jump to content

[SOLVED] Command-line PHP - setting $path and php.ini correctly


Recommended Posts

I've just installed WAMP5 on Windows XP, and I'm trying to get php to run from the command line.  I've added c:\wamp\php\php.exe to my system path, but when I type 'php -v' in my command line, I still get an error message that says 'php is not recognized'.  Is there something in the php.ini file that I need to change as well, or something else I need to do with my system path?  As far as I know, this should be working...

 

I also have php-win.exe in my php folder.  Should I be using that one instead of php.exe?

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Set the path to just C:\wamp\php instead and not c:\wamp\php\php.exe.

 

Make sure you restart Windows after changing/setting the path. Also make sure you have not set the path in 'User variables for xxx' box (replace xxx with your windows username). For some reason PHP does not read the variables set in that box. Make sure you set it in the 'System Variables' box instead.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.