|
Posted by My Pet Programmer on 12/24/07 00:41
Csaba Gabor said:
> On Dec 23, 9:35 am, wart...@hotmail.com wrote:
>>> First, what kind of program are you calling? Whats it do?
>> Its a few programs, made in c#. The programs mostly make operations on
>> the windows media server. They create publishing point, for example,
>> on the fly.
>>
>>> Second, please tell me you looked up Exec on the php.net site and read
>>> all the comments made by folks who have done or attempted to do what
>>> you are trying. The answer might be right there!
>> I had a look there. But no one that got the same king of problem.
>>
>>> Third, what kind of resources does the called program use? Are you
>>> running out of memory? are you running out of connections to a
>>> database? What is your take on why the program is failing? What
>>> permissions does the called program have? What permsissions does it
>>> need?-
>> I put log functions both in the php-script and in the c# app.
>>
>> I restart the server, and everything works. But then, after may one
>> day, for some reason, one of the c# app (can be any of them) freezes
>> during the execution, and before it can returns.
>>
>> The php-log says that, well, nothing. It stops when it has to show the
>> return value got from the c# app.
>>
>> The C# app doesnt catch. That is the big problem. The log function in
>> the c# app is located at the end of the try statement. And exactly
>> before the return statement. In the log file I try to write the return
>> value. But it is blank, for some reason.
>>
>> Worst of all, maybe, is that the c# app is runnable from the command
>> line. Always. And it executes returning the value. So the problem, as
>> I see it, is that suddenly the php-interpretor hangs up when running
>> exec.
>>
>> Yes, this is obvious, as I created a dummy c# app, one that only
>> returns hello world. Well, after the php-interpretor (or is it apache
>> stuff?) hangs up, I cannot either get the return value from that app.
>>
>> Is it an apache problem? What do you think guys? But the error log
>> doesnt have any trace of problems with the exec...
>
> There could be several reasons for this behaviour which are not at all
> obvious in my opinion. Here is possibility.
>
> It is possible to schedule Firefox to come up on a specific page (this
> type of scheduling is non trivial), and then if you have GreaseMonkey
> (GM) installed, it would do its thing and then shut down. For
> example, you could monitor a web site in this way. At the end, GM
> should tell the window to close itself, thus ending the scheduled app.
>
> When I first developed this, it worked finen under manual testing,
> only FF would ask me each time whether I really wanted to shut down
> (there is a preference setting to control this). When the task was
> automated and run under SYSTEM, I would again be asked whether I
> really wanted to exit. Since I could not respond to that dialog
> (since it wasn't visible), there was no way for the program to finish,
> so it didn't (yet it had run fine till the end).
>
> The moral is that it might be that your program under certain
> circumstances pops up a dialog that no one is there to dismiss. That
> could be a possible explanation to what is happening.
>
> Csaba Gabor from Vancouver
A while back, I had to write some code that called on Perl2exe on the
server to compile Perl modules. What I ran into was an issue where I had
to set the paths appropriately on the box by first executing a shell
script from php that set up the enironment for my command.
Could it be something like that?
~A!
Navigation:
[Reply to this message]
|