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.
|
|
|
|
|
![]() |
||
problem running php from the command line
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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. |
|
|||
|
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 |
![]() |
| Tags |
| cli |
| Thread Tools | |
|
|
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 20:15 |
| Fwrite with new line break problem? | meth8200 | PHP Forum | 2 | Feb 4th, 2008 15:23 |
| [SOLVED] How do I access my web server from the command line? | MikeHopley | Other Programming Languages | 5 | Jan 18th, 2008 15: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 19:27 |