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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.