Jump to content

[SOLVED] PHP Command Line (php.exe) help


techiefreak05

Recommended Posts

I am running WAMP Server on my computer, and I need to run a script with the PHP Command Line Interface... I've been doing some research and  so I tried entering the folowing command into the php command window: php -h, that is supposed to show a list of commands... nut it does nothing... nothing I try works... any ideas?

Link to comment
Share on other sites

Maybe this page will help... The first page isn't in English, but the command list is ;)

 

http://forum.php.pl/lofiversion/index.php/t38940.html OR

http://aspn.activestate.com/ASPN/docs/PHP/commandline.html

 

<b>And of course</b>... A WAMP subforum (child-forum) on phpfreaks.

http://www.phpfreaks.com/forums/index.php/board,56.0.html

 

Hope that helps!

Link to comment
Share on other sites

Sounds like the php cli isn't installed with WAMP.... either that or its simply not in your PATH.

 

Ive no idea how to set the PATH variable in windows, but the first thing I would do would be to look for the actual php.exe. Once (and if) you find it, open a terminal within that same directory and try...

 

php.exe -h

 

once again. If that works... you will need to google on how to add programs to the PATH variable in windows.

Link to comment
Share on other sites

try this. Go to start > Run > type in cmd > Enter

 

Now type the following command:

cd C:\wamp\php\

Press enter. This will move the terminal from the default folder (C:\Documents and Settings\<USER>\) to the where PHP is installed to. Which by default is C:/wamp/php when you install WAMP.

 

The terminal should now read this:

C:\wamp\php>

 

Now try the PHP help command again:

php -h

 

Does that work?

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.