473,231 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Keeping window open after running php file from the command line?

Hi all,

I was getting a 500 error and someone adviced me to run the php file
from the command line to check what errors that would come up with.

Great idea which I'd like to use, but when I use the Windows "run" box
to do this, I see a window open and close so quickly that there's no way
for me to read what's come up.

How can I force the window to stay open after the program has finished ?

Just in case it's needed, I run the tests on a Win XP machine with Apache.

Thanks in advance,
Juliette

Jul 17 '05 #1
8 3064
That's what the "DOS" /K switch is for.

--

"jrf[no]" <"jrf[no]"@[spam]jokeaday.net> wrote in message
news:41***********************@news.wanadoo.nl...
Hi all,

I was getting a 500 error and someone adviced me to run the php file
from the command line to check what errors that would come up with.

Great idea which I'd like to use, but when I use the Windows "run" box
to do this, I see a window open and close so quickly that there's no way
for me to read what's come up.

How can I force the window to stay open after the program has finished ?

Just in case it's needed, I run the tests on a Win XP machine with Apache.

Thanks in advance,
Juliette

Jul 17 '05 #2
Jeb Hunter wrote:
That's what the "DOS" /K switch is for.


Hi Jeb,

Thanks for your quick reply.

Just wondering how to use it...

If I enter the following in the run box, the window still closes:
C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K

What am I doing wrong ?

Thx again,
Juliette
Jul 17 '05 #3
jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
If I enter the following in the run box, the window still closes:
C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K

What am I doing wrong ?


Start a command shell first (cmd IIRC) or take a look at the start
command.
Jul 17 '05 #4
Daniel Tryba wrote:
jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
If I enter the following in the run box, the window still closes:
C:\apache\php\php.exe "I:\_Website\index.php?id=testing" /K

What am I doing wrong ?

Start a command shell first (cmd IIRC) or take a look at the start
command.

Hmm... I guess I'm too much of a newbie at running php through the
command line to understand what you mean...

Could you give me some examples maybe ? or point me to some webpages
with more information on running php through the command line on windows ?
I looked at the php manual but the information there doesn't seem to
answer my question.

Thx, Juliette
Jul 17 '05 #5
"jrf[no]" wrote:
Start a command shell first (cmd IIRC) or take a look at the start
command.


Hmm... I guess I'm too much of a newbie at running php through the
command line to understand what you mean...


In the run box you just have to enter "cmd".

A command window will open and there you enter

C:\apache\php\php.exe "I:\_Website\index.php?id=testing"

The window will stay open until you manually close it.
Jul 17 '05 #6
Anonymous wrote:
"jrf[no]" wrote:
Start a command shell first (cmd IIRC) or take a look at the start
command.


Hmm... I guess I'm too much of a newbie at running php through the
command line to understand what you mean...

In the run box you just have to enter "cmd".

A command window will open and there you enter

C:\apache\php\php.exe "I:\_Website\index.php?id=testing"

The window will stay open until you manually close it.

Ok, thanks for the advice.

Question remains then: why don't I see anything when I've done that, no
messages, nothing but a new prompt....

I entered something that should give a 500 and so should throw some php
errors...

Help very welcome....

Thx, Juliette
Jul 17 '05 #7
jrf[no] <"jrf[no]"@[spam]jokeaday.net> wrote:
Question remains then: why don't I see anything when I've done that, no
messages, nothing but a new prompt....

I entered something that should give a 500 and so should throw some php
errors...


This is absolutely not necessary. PHP can do a silent fail.

So you get get no output whatsoever running the phpscript from the
commandline? Next step would be to check the returnvalue from php.exe (I
have no idea where that is stored in win32) and run the script in a
debugger. But since you had problems opening a commandline I don't think
you are ready for this level of programming :)

Jul 17 '05 #8
"jrf[no]" <jrf[no]@[spam]jokeaday.net> wrote:
How can I force the window to stay open after the program has finished ?


Sending output to STDERR should do the trick...
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle
Jul 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: BlackHawke | last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses two programs- one to play the game, another to patch the game as updates come out. Players actually launch the updater...
0
by: Tom Dacon | last post by:
"Open .Net Command Window Here" context menu for Windows Explorer: The reg file described below adds a new menu item to Windows Explorer's context menu when you right-click over a folder (or the...
4
by: JeffP | last post by:
I want to add a short-cut to a windows app similar to launching from a windows run line a New window, to prevent changing an existing browser window from moving off a current logged in session...
1
by: Rob | last post by:
I'm running a batch file using the Shell function. When I manually launch the batch file, the window remains open, since I use the 'pause' statement. But when I launch the batch file within...
4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
5
by: somersbar | last post by:
i hav a project in visual basic.net which uses asp.net web forms to access a microsoft access database. i had fierce trouble getting it to access the database but fixed it by accident. basically i...
3
by: Andrew Poulos | last post by:
There's a HTA application that's running on a local computer (not from a URL) and the user can open a new HTML window by clicking a button The first time the user clicks the button the window...
0
by: stefburn | last post by:
Hello Folks, Okay so I'm running a server window to debug some issues. I can keep the server window open by going to the path and opening a command prompt at the path of the <server.exe> file...
1
by: SilverGS | last post by:
I want to automatically open a Command Window from the Startup folder in Windows XP. right now after XP starts, I click on Start run, cmd and then when the command window is open I type in a bunch...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.