Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Time Out Error
March 16, 2005, 7:49 pm
rate this thread
[FAQ] Time Out Error
Q. How do I run a time consuming PHP script?
A. Two types of time-outs can occur during the execution of a PHP script:
the server terminates the script because it is taking too long to finish, or
the client terminates the connection while waiting for a response. You can
avoid the first by setting a different time limit through
set_time_limit()--server configuration permitting. The second type of
time-outs are much harder to avoid because you have no control over the
client. Typically a browser waits 30 seconds to a minute for data to arrive.
If your script does not output anything within that time frame, the
connection will be teriminated. An end-user might also terminate a
connection manually if the script seems unresponsive.
There is no good solution to this second problem. Your script must output
something to keep the connection active.