beginer has asked for the wisdom of the Perl Monks concerning the following question:

I am calling a script froma webpage. It takes few minutes (around 10 min)to complete the processing of the script. In this process the html page shows internal error. As per suggestion form forum member I tried system() and exec() and print a message that results will be sent by email. But the problem still persists. Nothing is printed on the screen till script is executing in background . I know i am making some stupid mistake...but please help me ...else my boss...will hang me on the wall :(

Replies are listed 'Best First'.
Re: script timing out
by EdwardG (Vicar) on May 19, 2004 at 07:47 UTC

    My sympathy, it can't be easy working for the Dungeon Keeper.

    There have been some excellent replies to this question at avoid time out, and as usual, merlyn has written an article on the subject.

    If you still need more help, I'm afraid you will need to provide more information about your technical environment, and show us your code.

     

      Thanks everyone for help....It worked when flushed the buffer...:) Thanks once again
Re: script timing out
by beth (Scribe) on May 20, 2004 at 07:17 UTC

    Are you sure you want to use a CGI script for this? Users are rarely patient enough to wait ten minutes for a script to finish.

    You don't say what you're using this script for, but consider submitting the request to a queue and notifying the user that they will receive an email with the results in approximately ten minutes. Or, if it's not personalized (or if you know ahead of time who your audience is), have the script run on a cron job and write the results to a static html page.

    You know what your needs are; consider if you're doing it the right way.