"Anthony J. Breeds-Taurima" wrote:
> 
> On Thu, 27 Sep 2001, will trillich wrote:
> 
> > HOW can i have apache/web page
> > initiate a process and return quickly to generate a 'processing,
> > hold on' page while the process does its processing?
> >
> > i've got a web page that i launch after ftp-ing a bunch of
> > images up to a website. it starts some Image::Magick filters and
> > takes a Bloody Good Long Time to complete. i've got mod_perl
> > calling the script as an external command (slow, but it keeps
> > the ::Magick libraries from sucking up over a meg of apache
> > memory) and it forks ...
> 
> Not eaxctly what you asked but you can deiplay a tempoary page while you're
> loading.
> 
> #!/usr/bin/perl
> 
> $|=1;
> select (STDOUT);
> sub Code($);
> 
> ## the line below should all be on one line (in case it get wrapped)
> print STDOUT "Content-Type: 
> multipart/x-mixed-replace;boundary=TextString\n\n";
> 
> for($i=0;$i<=5;$i++) {
>         print Code($i);
>         sleep 1;
> }
> print Code("All Done");
> print STDOUT "--TextString--\n";
> 
> sub Code($) {
>         $msg=shift;
>         return <<"DONE";
> --TextString
> Content-Type: text/html
> 
> <body>
> <Pre>
> $msg
> </Pre>
> </body>
> DONE
> }
> 
> You can see the output of this at:
> http://thor.cantech.net.au/~tony/Misc-cgi/count.cgi
> 
> You could easily use this redraw, the screen after rendering X images.

not a bad idea. unless i can figure out how to do the
fork-and-return, this may work as a fallback. thanks
for the refresher!

-- 
mailto:[EMAIL PROTECTED]
http://www.dontUthink.com/

Reply via email to