PHP: Browser timeout workaround??
I have a webpage which, when given some info, goes off and executes a perl script in the background. Only problem: the perl script can take up to 120 seconds to execute.
Typically the browser will timeout after about 30 seconds. I have tried the following to correct this and allow the perl script to finish its run: 1. Use set_time_limit to give the PHP script more time to execute (browser still timed out; sometimes with 'Connection: close' being returned) 2. Used proc_open to create a resource and tried to pass the resource via session variables - this also used a meta-refresh. In case you don't know - I just found out - resources cannot be serialized; aka, cannot be stored in as a session variable. How do I (either via a single page request or through refreshes) allow the perl script to execute and then return its output to the user? Thanks for any thoughts and / or ideas. jpbarto |
If you have access to httpd.conf, you could try set :
Code:
KeepAliveTimeout 150 |
Unfortunately I do not have access tot he 'root' httpd.conf. Is that a directive which I could setup under a localized 'virtual host' conf file? Or is it something which can be placed into an http header from php?
|
All times are GMT -5. The time now is 01:06 AM. |