473,473 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Timeout of http request

Hi NG,

I have my own apache server 2.0.54 running with php 4.3.10.

I got a little logical problem here about http requests.

I have written a small php script which waits for x seconds. Every
second it appends the seconds to a file.

I expected a timeout after 300 seconds, becouse apache is configured
like that. But until now it doesn't matter. I can wait for more than 5
minutes and the script finishes i see the result page.

Why my browser doesn't get a timeout. Which part is responsible for a
timeout???

Here the code:

<?php

// All print functions do not show up on the screen until it is
finished
print 'Now we wait<br>';

for($i = 1; $i <= 360; ++$i) {
sleep(1);
print "$i<br>";
$handle = fopen('test.dat', "a");
fwrite($handle, $i . "\n");
fclose($handle);
}

print '<br><br>End...<br>';

?>
Thanks...

Nov 22 '05 #1
3 8437
hakim wrote:
Hi NG,

I have my own apache server 2.0.54 running with php 4.3.10.

I got a little logical problem here about http requests.

I have written a small php script which waits for x seconds. Every
second it appends the seconds to a file.

I expected a timeout after 300 seconds, becouse apache is configured
like that. But until now it doesn't matter. I can wait for more than 5
minutes and the script finishes i see the result page.

Why my browser doesn't get a timeout. Which part is responsible for a
timeout???

Here the code:

<?php

// All print functions do not show up on the screen until it is
finished
print 'Now we wait<br>';

for($i = 1; $i <= 360; ++$i) {
sleep(1);
print "$i<br>";
$handle = fopen('test.dat', "a");
fwrite($handle, $i . "\n");
fclose($handle);
}

print '<br><br>End...<br>';

?>
Thanks...


Hi,

PHP has its own timeout.
It is defined in php.ini

The option you need is max-execution-time.

http://nl2.php.net/manual/en/ref.inf...execution-time

You can overrule this setting on most systems in your script with:
ini_set("max-execution-time" , 600);
for 600 seconds.

Good luck
Regards,
Erwin Moller
Nov 22 '05 #2
Hi,

max-execution-time is set to 30 seconds in php.ini, but my script runs
much longer than that. So where can I configure my apache/php to stop
such scripts like mine???

Thanks...

Nov 22 '05 #3
hakim wrote:
Hi,

max-execution-time is set to 30 seconds in php.ini, but my script runs
much longer than that. So where can I configure my apache/php to stop
such scripts like mine???

Thanks...


Hi hakim,

That is very strange.
As far as I know, the max executiontime is always working.
:-/

I am out of ideas.
You might try an apache newsgroup.

Good luck.

Regards,
Erwin Moller
Nov 22 '05 #4

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

Similar topics

1
by: alien2_51 | last post by:
I have an ASP.Net application running one level above the root web server. The root web server is configured for a 60 min session timeout. If I omit the timeout setting in the web.config eg..{...
8
by: P. Glassel | last post by:
I'm having problems getting session timeouts to change programmaticlaly under IIS6.0. This is unchanged code that ran as expected under IIS5.0. Anyone else run into this problem? Thx.
8
by: Shalini | last post by:
If I have an ASPX page that is just sleeping for 3 minutes ormore and later does some processing and the ExecutionTimeout parameter in the machine.config is 90 seconds then the page does not...
10
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution...
0
by: Christopher H. Laco | last post by:
I'm in a strange situation. I have a dataset that uses it own connection string from MySettings. All is well. This thing works in .NET just dandy. If I reference this dataset from another...
5
by: Dave | last post by:
Hi All, Can anyone suggest a reliable solution to php redirect?: header("Location: $redir_url"); if the above times out in $timeout seconds header("Location: $alt_redir_url"); Many thanks,
5
by: Ed | last post by:
I have some questions in regards to Session variables and IIS Recycling: 1. Does the IIS setting 'Shutdown worker process after being idle' affect an application's session variables? Or is IIS...
1
by: a.r.austin | last post by:
Hello, I am trying to download a few files one after another from a remote server. Problem is that I don't know how to, or if I am able at all, set a time out for download. I don't want to time...
12
by: Sophie000 | last post by:
I am implementing a peer-to-peer program: When a computer A receives “get file XXX” from stdio, it broadcasts (floods) a request packet to ask others. Both Computer B and C have the file so they...
2
by: JimLad | last post by:
Hi, I've got a very basic asp.net page that accesses a very slow db query and siplays to screen. I'm hitting a timeout aftre about 3.5 to 4.5 minutes - seems to be variable. SQL connection...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.