|
Posted by Kimmo Laine on 09/19/05 14:34
"Shawn Wilson" <firstinitial_lastname@dvigroup.net> wrote in message
news:O8sXe.95208$0I4.61655@fe05.news.easynews.com...
> "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.
>
You might also try to set it to infinite:
set_time_limit(0);
0 as the parameter sets the execution time to infinite. See if that helps.
--
Welcome to Usenet! Please leave tolerance, understanding
and intelligence at the door. They aren't welcome here.
antaatulla.sikanautaa@gmail.com.NOSPAM.invalid
Navigation:
[Reply to this message]
|