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
https://forums.phpfreaks.com/topic/53233-solved-php-command-line-phpexe-help/
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!

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.

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?

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.