problem running php from the command line

This is a discussion on "problem running php from the command line" within the PHP Forum section. This forum, and the thread "problem running php from the command line are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 2nd, 2006, 18:26
New Member
Join Date: Dec 2006
Location: Wakefield
Age: 32
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
problem running php from the command line

Hi,

I am trying to get PHP to run from the command line as the book I am working with suggests that this is possible with my setup. I am running PHP 5.2 and Apache 2.0.59 on Windows xp.

When I try to run PHP from the command line nothing happens. I would be grateful for any help or guidance.

Cheers,

Rob
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 4th, 2006, 22:24
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem running php from the command line

Do you mean that when you type in "PHP" and press enter, the cursor just sits there?

If so, type in:

HELLO WORLD (on one line
^Z (that's control Z) on the next

and press enter.

If you run PHP without any parameters at the command line, it read what you type as your PHP program but only runs it when it reaches the end of file; Control-Z on a line on its own is the xp EOF, and until it gets that it will just suck in what you type.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 5th, 2006, 19:06
New Member
Join Date: Dec 2006
Location: Wakefield
Age: 32
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Re: problem running php from the command line

Many thanks Grahame.

My actual problem was that I was running the PHP exe before trying to run php at the command line instead of changing directory to the folder where the exe is located and then running php at the command line. Your reply was a great aid to me finding that out.

Cheers,

Rob
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
cli

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Have a major problem with Text Line-Height vidoewebmastery Web Page Design 2 Mar 24th, 2008 21:15
Fwrite with new line break problem? meth8200 PHP Forum 2 Feb 4th, 2008 16:23
[SOLVED] How do I access my web server from the command line? MikeHopley Other Programming Languages 5 Jan 18th, 2008 16:35
Blank line problem dartiss Web Page Design 8 Aug 6th, 2007 21:28
Problem running Java stroodle01 Other Programming Languages 2 Mar 24th, 2007 20:27


All times are GMT. The time now is 10:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved