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.