Reply to Re: How to properly handle lengthy operations?

Your name:

Reply:


Posted by punkstar on 09/12/06 06:25

I haven't needed to use this yet, but I was considering what I would do
if I hit a problem like this just a few weeks ago. What I came up with
was some ajax feedback. During the exec of your script, you should
write to a file exactly what you would like to appear as feedback to
the user. You would then write some js to grab the contents of the
file that you have written to and display it on the page.

Haven't really tried it, but in theory its a sound idea as far as I can
tell.

As for timing out, im sure you've heard of set_time_limit()?

I'd like to read other people's ideas.

Jonah Bishop wrote:
> I'm developing a photo album web application for use on a web site, and
> I'm running into a problem with lengthy operations. My application
> allows the user to import a number of images at once into a photo
> album. For each image that gets imported, I create two thumbnail images
> (small and medium) and insert some data into a database. The thumbnail
> generation process takes some time and, for relatively large amount of
> photos, the application apparently times out. For example, if I import
> 40 pictures at once, 15 or so get imported successfully, but the app
> then seems to time out. So I then have to import the images that are
> left (that didn't get imported).
>
> How can I properly handle such a lengthy operation? Ideally, I would
> like to let the user know what's going on (and how much progress has
> been made). And I certainly want all of the photos (no matter how many)
> to be imported at once.
>
> Are there programming paradigms that work well for situations like
> this? What tips do people here have for such a situation? Any help
> would be greatly appreciated! Thanks.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация