On 31 Oct 2008, at 13:17, Alice Wei wrote:
Alice Wei wrote:
Hi,
To answer your question, the exe file is written in C and creates
several output files that calculates various variables based on the
user input (which the PHP handles).
What I am surprised
about is that when I run the exe file by itself, there is no error at
all. However, once I use PHP to "call" the file, it does not crash,
but
I have to click No when it executes to allow the program to proceed. I
tried to follow the instructions from the document in the url below,
but I could not find the files, and I was not sure if that really is
the cause of the interruptions of my program.
Does this give you more information in helping me solve my
problem?
Thanks in advance.
Do you have the source of the exe? Is it C or C++ or C#?
The
exe file is written in C, but I don't have the source file of it,
since
my client wanted me to execute it using that to prevent my having to
execute several codes.
I have just tried using command prompt to
execute the command below, and there were no errors, and no Visual
Studio Just In-Time Debugger pop up boxes generated.
my-manager.exe -d24 -p20
Do I have to install Visual Studio on the machine of where my PHP is
executing this exe file?
That debugging window is appearing therefore you must have VS
installed on the machine you're running it on.
There are many things you need to be careful of when executing a shell
from PHP, primarily these are ensuring that permissions are correct
and that the thing you're executing does not attempt to use anything
other than stdin/out/err (i.e. nothing outside the standard C library,
so no windows etc).
The window usually indicates an unhandled exception or other
catastrophic event, in which case you need to be taking it back to
where you got it from and telling them about it. Unless the debugging
window indicates that it's PHP that's crashing not your exe. I'd
double check that first if I were you.
-Stut
--
http://stut.net/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php