Browser Timeout

Discussion in 'PHP' started by anoopsinghal, Dec 31, 2007.

  1. #1
    Hi,

    I have created a PHP script that takes around 15-20 Mins in processing. The script runs completely but my browser times out after few mins and the background process is still running and the task is completed.

    I have sent out put at each and every step of the script that should be output after every 10sec to browser but my script is not printing any thing on the browser.

    Any kind of hel in this regard would be really helpful.

    Regards
    Anoop
     
    anoopsinghal, Dec 31, 2007 IP
  2. DarkMindZ

    DarkMindZ Guest

    Messages:
    175
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    My guess is, its using a loop, therefore the browser is still trying to load it, while the PHP is still processing, causing a time out at your end...

    if the process runs normally, why would bother with the timeouts? do you really need to see it getting done?

    or, you can try to execute it from command line.
     
    DarkMindZ, Dec 31, 2007 IP
  3. anoopsinghal

    anoopsinghal Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    Thanks for response. Well you are right it is there in loop. Actually I have developed this application for one of my client to run on his browser. Now he should be aware when the process is completed.

    Let me know if there is any other option for it.

    Regards
    Anoop
     
    anoopsinghal, Dec 31, 2007 IP
  4. DarkMindZ

    DarkMindZ Guest

    Messages:
    175
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Make it echo the process details maybe, or try to optimize your code a little more..

    one trick tho, you can make it do the process in batches, so:

    Process one done. [ pause, tell the user the details., and ask him to click next to continue.. ] once next clicked, goes to proccess two, and so on..
     
    DarkMindZ, Dec 31, 2007 IP
  5. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Are you using the ob_flush functions ??? or do you have a huge database query on a huge database ??!!
     
    selling vcc, Dec 31, 2007 IP
  6. anoopsinghal

    anoopsinghal Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well my script is crawling the html pages. I have tried ob_flush, flush but still no response.
     
    anoopsinghal, Jan 1, 2008 IP