[PHP] Need "Working..." pop up dialog (repost)
I'm trying to get a "working..." informational dialog or window going with my PHP page but I'm not getting anywhere. Here's the situation: When the user clicks on a link that has to gunzip a very large file, I want a popup to say "Working..." while the file is uncompressing. Then, when the file is uncompressed, I want the "Working..." popup to close itself and then the parent window to load a new URL (where it will use the uncompressed file). I've tried doing this with Javascript and window.open(), but I'm having no luck. Any ideas? -- - Ray Clouse | Don't fear the penguins. Engineer Scientist/Specialist | Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com Huntington Beach, CA | clouse AT rayclouse.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
Ray Clouse wrote: > When the user clicks on a link that has to gunzip a very large file, I > want a popup to say "Working..." while the file is uncompressing. > Then, when the file is uncompressed, I want the "Working..." popup to > close itself and then the parent window to load a new URL (where it > will use the uncompressed file). > > I've tried doing this with Javascript and window.open(), but I'm having > no luck. Any ideas? Is the uncompressing taking place on the server? or on the local (user) machine? Sounds like it's on the server. The problem is, you have no *real* way of knowing how long the de-comp will take (due to other factors, like server/client load, etc etc), so how do you know when to go from "working" to "done". So, i'm trying to figure out WHY you're uncompressing a file on the server that will be used by visitors over http. Seems wrong to me. Increased server load, more programs, more problems, slower server response time, increased user anger, etc etc. Enlighten me as to why, because I may be missing something. Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
It's due to space restrictions on the server. We have 300GB available on the server, but the compressed data takes up 200GB, and we're adding new data (several GB) every month or so. So we need to keep as much compressed as possible, but we have to uncompress the data for the webpages to use it. The PHP webpages on the server use the uncompressed data to generate plots. The data is never sent to the user, just the plots. The main problem I'm having is with page resolution. If I say: print("jsPopupWindow('Starting UNZIP');\n"); $gunzipcmdline = "gunzip /PATHTO/MYDATA"; $result = exec("$gunzipcmdline", $execout, $execretval); print("jsPopupWindow('Finished UNZIP');\n"); the 'Starting UNZIP' popup appears at the same time as the 'Finished UNZIP' one. The page hasn't resolved until after the gunzip is done, so it doesn't execute the Javascript the way I want it to. I've tried popping up a window, getting the handle, passing the handle to the gunzip code, then closing the handle when the gunzip is done, but that hasn't worked either. Justin French wrote: >Ray Clouse wrote: > >>When the user clicks on a link that has to gunzip a very large file, I >>want a popup to say "Working..." while the file is uncompressing. >>Then, when the file is uncompressed, I want the "Working..." popup to >>close itself and then the parent window to load a new URL (where it >>will use the uncompressed file). >> >>I've tried doing this with Javascript and window.open(), but I'm having >>no luck. Any ideas? >> > >Is the uncompressing taking place on the server? or on the local (user) >machine? Sounds like it's on the server. > >The problem is, you have no *real* way of knowing how long the de-comp >will take (due to other factors, like server/client load, etc etc), so >how do you know when to go from "working" to "done". > > >So, i'm trying to figure out WHY you're uncompressing a file on the >server that will be used by visitors over http. > >Seems wrong to me. Increased server load, more programs, more problems, >slower server response time, increased user anger, etc etc. > > >Enlighten me as to why, because I may be missing something. > > >Justin French > -- - Ray Clouse | Don't fear the penguins. Engineer Scientist/Specialist | Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com Huntington Beach, CA | clouse AT rayclouse.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
On Tuesday 21 August 2001 17:10, Ray Clouse wrote: > So we need to keep as much compressed as possible, but we have to > uncompress the data for the webpages to use it. The PHP webpages on > the server use the uncompressed data to generate plots. The data is > never sent to the user, just the plots. > > The main problem I'm having is with page resolution. If I say: > > print("jsPopupWindow('Starting UNZIP');\n"); > > $gunzipcmdline = "gunzip /PATHTO/MYDATA"; > $result = exec("$gunzipcmdline", $execout, $execretval); Uncompressing should not take that much time. And you can speed it up by using the zlib functions instead of a exec (gunzip ...) http://php.net/gzopen Also, if the file to be uncompressed is very large, you should cache the results (the generated plots). -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Install once, run forever. Linux. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
Another part of this is an external program on the server that can't read from the gzipped file. The file has to be uncompressed, unfortunately. The resulting uncompressed file is recompressed through a cron job after 30 days if it hasn't been used for 30 days. I came up with something that appears to work WRT the pop up dialog problem. In my main browser window, from Javascript, I pop up an alert telling the luser the unzip is beginning. Then in the gunzip code, in the , I do this: print("On Tuesday 21 August 2001 17:10, Ray Clouse wrote: > >>So we need to keep as much compressed as possible, but we have to >>uncompress the data for the webpages to use it. The PHP webpages on >>the server use the uncompressed data to generate plots. The data is >>never sent to the user, just the plots. >> >>The main problem I'm having is with page resolution. If I say: >> >> print("jsPopupWindow('Starting UNZIP');\n"); >> >> $gunzipcmdline = "gunzip /PATHTO/MYDATA"; >> $result = exec("$gunzipcmdline", $execout, $execretval); >> > >Uncompressing should not take that much time. And you can speed it up by >using the zlib functions instead of a exec (gunzip ...) >http://php.net/gzopen > >Also, if the file to be uncompressed is very large, you should cache the >results (the generated plots). > -- - Ray Clouse | Don't fear the penguins. Engineer Scientist/Specialist | Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com Huntington Beach, CA | clouse AT rayclouse.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
You may just need a flush() call after the Starting UNZIP. http://php.net/flush PHP (Apache, actually) sends data to the browser when there's enough to send, not right away. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Ray Clouse <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Cc: php <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 10:10 AM Subject: Re: [PHP] Need "Working..." pop up dialog (repost) > It's due to space restrictions on the server. We have 300GB available > on the server, but the compressed data takes up 200GB, and we're adding > new data (several GB) every month or so. > > So we need to keep as much compressed as possible, but we have to > uncompress the data for the webpages to use it. The PHP webpages on the > server use the uncompressed data to generate plots. The data is never > sent to the user, just the plots. > > The main problem I'm having is with page resolution. If I say: > > print("jsPopupWindow('Starting UNZIP');\n"); > > $gunzipcmdline = "gunzip /PATHTO/MYDATA"; > $result = exec("$gunzipcmdline", $execout, $execretval); > > print("jsPopupWindow('Finished UNZIP');\n"); > > the 'Starting UNZIP' popup appears at the same time as the 'Finished > UNZIP' one. The page hasn't resolved until after the gunzip is done, so > it doesn't execute the Javascript the way I want it to. I've tried > popping up a window, getting the handle, passing the handle to the > gunzip code, then closing the handle when the gunzip is done, but that > hasn't worked either. > > Justin French wrote: > > >Ray Clouse wrote: > > > >>When the user clicks on a link that has to gunzip a very large file, I > >>want a popup to say "Working..." while the file is uncompressing. > >>Then, when the file is uncompressed, I want the "Working..." popup to > >>close itself and then the parent window to load a new URL (where it > >>will use the uncompressed file). > >> > >>I've tried doing this with Javascript and window.open(), but I'm having > >>no luck. Any ideas? > >> > > > >Is the uncompressing taking place on the server? or on the local (user) > >machine? Sounds like it's on the server. > > > >The problem is, you have no *real* way of knowing how long the de-comp > >will take (due to other factors, like server/client load, etc etc), so > >how do you know when to go from "working" to "done". > > > > > >So, i'm trying to figure out WHY you're uncompressing a file on the > >server that will be used by visitors over http. > > > >Seems wrong to me. Increased server load, more programs, more problems, > >slower server response time, increased user anger, etc etc. > > > > > >Enlighten me as to why, because I may be missing something. > > > > > >Justin French > > > > -- > - > Ray Clouse | Don't fear the penguins. > Engineer Scientist/Specialist | > Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com > Huntington Beach, CA | clouse AT rayclouse.org > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need "Working..." pop up dialog (repost)
That's exactly what I needed! Thanks! Richard Lynch wrote: >You may just need a flush() call after the Starting UNZIP. > >http://php.net/flush > >PHP (Apache, actually) sends data to the browser when there's enough to >send, not right away. > >-- >WARNING [EMAIL PROTECTED] address is an endangered species -- Use >[EMAIL PROTECTED] >Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm >Volunteer a little time: http://chatmusic.com/volunteer.htm >- Original Message - >From: Ray Clouse <[EMAIL PROTECTED]> >Newsgroups: php.general >To: <[EMAIL PROTECTED]> >Cc: php <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Tuesday, August 21, 2001 10:10 AM >Subject: Re: [PHP] Need "Working..." pop up dialog (repost) > > >>It's due to space restrictions on the server. We have 300GB available >>on the server, but the compressed data takes up 200GB, and we're adding >>new data (several GB) every month or so. >> >>So we need to keep as much compressed as possible, but we have to >>uncompress the data for the webpages to use it. The PHP webpages on the >>server use the uncompressed data to generate plots. The data is never >>sent to the user, just the plots. >> >>The main problem I'm having is with page resolution. If I say: >> >> print("jsPopupWindow('Starting UNZIP');\n"); >> >> $gunzipcmdline = "gunzip /PATHTO/MYDATA"; >> $result = exec("$gunzipcmdline", $execout, $execretval); >> >> print("jsPopupWindow('Finished UNZIP');\n"); >> >>the 'Starting UNZIP' popup appears at the same time as the 'Finished >>UNZIP' one. The page hasn't resolved until after the gunzip is done, so >>it doesn't execute the Javascript the way I want it to. I've tried >>popping up a window, getting the handle, passing the handle to the >>gunzip code, then closing the handle when the gunzip is done, but that >>hasn't worked either. >> -- - Ray Clouse | Don't fear the penguins. Engineer Scientist/Specialist | Boeing Expendable Launch Vehicles | Ray.Clouse AT boeing.com Huntington Beach, CA | clouse AT rayclouse.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]