LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-05-2005, 09:52 AM   #1
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
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
 
Old 08-05-2005, 10:08 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,454

Rep: Reputation: 96
If you have access to httpd.conf, you could try set :
Code:
KeepAliveTimeout 150
 
Old 08-05-2005, 10:30 AM   #3
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Original Poster
Rep: Reputation: 45
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 3 - PHP - Socket timeout b_whelan Linux - Software 2 09-29-2005 02:41 AM
PHP script timeout J_Szucs Linux - Software 4 01-22-2004 04:10 PM
browser does not convert query_string/url spaces to '+', seeking workaround? Sm0k3 Programming 0 11-25-2003 05:44 PM
Timeout after 30s (apache+php+postgreSQL) J_Szucs Linux - Software 4 10-10-2003 01:30 PM
php registerglobal = off workaround? stelar Linux - Security 2 06-30-2003 02:04 AM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration