FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to Prevent Apache Server From Hanging while running a batch file?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to Prevent Apache Server From Hanging while running a batch file? [message #179806] Fri, 07 December 2012 04:53 Go to next message
Fastian is currently offline  Fastian
Messages: 20
Registered: June 2012
Karma: 0
Junior Member
I am using xampp on Windows platform.I am running a batch file with exec() command from my php script. It works well when user gives correct input and batch file completes its execution properly. But if the user give some wrong input and batch file remains unable to complete its execution, apache server hangs. Then I have to restart the server.

I want that the apache should not hang and it should not be dependent on the execution of the batch file. Just I should be able to correct my input instead of restarting the xampp.

Can anyone help?
Re: How to Prevent Apache Server From Hanging while running a batch file? [message #179807 is a reply to message #179806] Fri, 07 December 2012 04:59 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 12/6/2012 11:53 PM, Fastian wrote:
> I am using xampp on Windows platform.I am running a batch file with exec() command from my php script. It works well when user gives correct input and batch file completes its execution properly. But if the user give some wrong input and batch file remains unable to complete its execution, apache server hangs. Then I have to restart the server.
>
> I want that the apache should not hang and it should not be dependent on the execution of the batch file. Just I should be able to correct my input instead of restarting the xampp.
>
> Can anyone help?
>

Fix your batch file so it completes execution whether or not the input
is correct.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: How to Prevent Apache Server From Hanging while running a batch file? [message #179808 is a reply to message #179807] Fri, 07 December 2012 06:07 Go to previous messageGo to next message
Fastian is currently offline  Fastian
Messages: 20
Registered: June 2012
Karma: 0
Junior Member
On Friday, December 7, 2012 9:59:31 AM UTC+5, Jerry Stuckle wrote:
> On 12/6/2012 11:53 PM, Fastian wrote:
>
>> I am using xampp on Windows platform.I am running a batch file with exec() command from my php script. It works well when user gives correct input and batch file completes its execution properly. But if the user give some wrong input and batch file remains unable to complete its execution, apache server hangs. Then I have to restart the server.
>
>>
>
>> I want that the apache should not hang and it should not be dependent on the execution of the batch file. Just I should be able to correct my input instead of restarting the xampp.
>
>>
>
>> Can anyone help?
>
>>
>
>
>
> Fix your batch file so it completes execution whether or not the input
>
> is correct.
>
>
>
> --
>
> ==================
>
> Remove the "x" from my email address
>
> Jerry Stuckle
>
> JDS Computer Training Corp.
>
> jstucklex(at)attglobal(dot)net
>
> ==================

Ok. My batch file is as follows:

latex 1.tex
dvipng 1.dvi
copy 11.png question-preview

The first command do not runs successfully due to invalid input. Can you please suggest that how can I fix this batch file so that it should work independent of the input.
Re: How to Prevent Apache Server From Hanging while running a batch file? [message #179809 is a reply to message #179808] Fri, 07 December 2012 08:33 Go to previous messageGo to next message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 07.12.2012 07:07, schrieb Fastian:
> On Friday, December 7, 2012 9:59:31 AM UTC+5, Jerry Stuckle wrote:
>> On 12/6/2012 11:53 PM, Fastian wrote:
>>
>>> I am using xampp on Windows platform.I am running a batch file with exec() command from my php script. It works well when user gives correct input and batch file completes its execution properly. But if the user give some wrong input and batch file remains unable to complete its execution, apache server hangs. Then I have to restart the server.
>>
>>>
>>
>>> I want that the apache should not hang and it should not be dependent on the execution of the batch file. Just I should be able to correct my input instead of restarting the xampp.
>>
>>>
>>
>>> Can anyone help?
>>
>>>
>>
>>
>>
>> Fix your batch file so it completes execution whether or not the input
>>
>> is correct.
>>
>>
>>
>> --
>>
>> ==================
>>
>> Remove the "x" from my email address
>>
>> Jerry Stuckle
>>
>> JDS Computer Training Corp.
>>
>> jstucklex(at)attglobal(dot)net
>>
>> ==================
>
> Ok. My batch file is as follows:
>
> latex 1.tex
> dvipng 1.dvi
> copy 11.png question-preview
>
> The first command do not runs successfully due to invalid input. Can you please suggest that how can I fix this batch file so that it should work independent of the input.
>

Ask the latex people. In the default configuration, on error latex switches to an
input prompt to ask the user to correct it.

/Str.
Re: How to Prevent Apache Server From Hanging while running a batch file? [message #179812 is a reply to message #179808] Fri, 07 December 2012 13:13 Go to previous message
Robert Heller is currently offline  Robert Heller
Messages: 60
Registered: December 2010
Karma: 0
Member
At Thu, 6 Dec 2012 22:07:57 -0800 (PST) Fastian <abdulbasit(dot)fast(at)gmail(dot)com> wrote:

>
> On Friday, December 7, 2012 9:59:31 AM UTC+5, Jerry Stuckle wrote:
>> On 12/6/2012 11:53 PM, Fastian wrote:
>> =20
>>> I am using xampp on Windows platform.I am running a batch file with exe=
> c() command from my php script. It works well when user gives correct input=
> and batch file completes its execution properly. But if the user give some=
> wrong input and batch file remains unable to complete its execution, apach=
> e server hangs. Then I have to restart the server.
>> =20
>>>
>> =20
>>> I want that the apache should not hang and it should not be dependent o=
> n the execution of the batch file. Just I should be able to correct my inpu=
> t instead of restarting the xampp.
>> =20
>>>
>> =20
>>> Can anyone help?
>> =20
>>>
>> =20
>> =20
>> =20
>> Fix your batch file so it completes execution whether or not the input=20
>> =20
>> is correct.
>> =20
>> =20
>> =20
>> --=20
>> =20
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> =20
>> Remove the "x" from my email address
>> =20
>> Jerry Stuckle
>> =20
>> JDS Computer Training Corp.
>> =20
>> jstucklex(at)attglobal(dot)net
>> =20
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> Ok. My batch file is as follows:
>
> latex 1.tex
> dvipng 1.dvi
> copy 11.png question-preview
>
> The first command do not runs successfully due to invalid input. Can you pl=
> ease suggest that how can I fix this batch file so that it should work inde=
> pendent of the input.
>

Try prepending the 1.tex file with '\batchmode'.


--
Robert Heller -- 978-544-6933 / heller(at)deepsoft(dot)com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Simpler way to validate form fields?
Next Topic: imap_open: Certificate Error, but only in PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 01:55:55 GMT 2024

Total time taken to generate the page: 0.05136 seconds