Reply to Re: Dealing with maximum execution time

Your name:

Reply:


Posted by Shawn Wilson on 09/19/05 08:37

"Shawn Wilson" <firstinitial_lastname@dvigroup.net> wrote in message
news:jxrXe.122430$e95.105593@fe08.news.easynews.com...
> Is there any way for me to get past a server setting of 10 seconds for
> PHPs maximum execution time?
>
> I've tried the [set_time_limit()] command and it does nothing. I set it
> to 100 first, then 30000, still cuts me off at 10 seconds saying I've
> exceeded the time limit.
>
> What I'm doing is stepping through a list of images in one directory and
> copy/resizing them to another. Right now I've got 50 images, but it could
> be several hundred.
>
> I was thinking that the only way I could get around the time limit is
> maybe to make a list of files, write that list to a text file (or cookie I
> guess), and redirect back to the page over and over using that file to
> keep track of where I'm at in the list.
>
> Any other ideas? I think my idea is rather dirty and I'd like a smarter
> way to do this.
>
> Thanks!

After a little more searching, I found that my server is not set to php's
safe mode, but my placement of the set_time_limit() command was incorrect.

I needed to put that command inside my loop so it reset with each execution
of the loop. I thought that I could use that command once at the top of the
script with a 5 min timeout maybe and be done with it, but it needs to be
inside the loop so it resets as long as the script is running.

--
Shawn Wilson

[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

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