in reply to Re: CGI, fork, long processes on Apache 2
in thread CGI, fork, long processes on Apache 2
The code you provided isn't very helpful. Are you saying that the script itself fails, or that the script works in the background, and the web page won't refresh? There is a big difference, and there are very different answers to each question.
print $query->redirect("New URL goes here");
The script doesn't fail, it's the redirect header that's not being honored by the browser because Apache hasn't dropped the connection. The redirect will go through once the process ends (a good three or four minutes later.) To shortcut that wait, I fork and the parent dies.
Now that I've re-read your post a couple of times, I like that you presented a viable alternative to my redirect/fork trick. Why not print a page to the browser asking it to refresh itself to the page I want? That's so simple and obvious compared to redirect/fork. I'll try it and post back when it works.
Thanks as well for the Javascript update % idea. I wasn't aware that Javascript could reach out to the web and read in another page outside the current one. Javascript gives me the willies though because of how difficult it is to make a script work in every browser. Maybe I'll take a look at it again in the near future.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI, fork, long processes on Apache 2
by Anonymous Monk on Apr 03, 2004 at 23:36 UTC | |
by Vautrin (Hermit) on Apr 04, 2004 at 20:20 UTC |