forum.coppermine-gallery.net

No Support => Feature requests => Scheduled for cpg1.5.x => Topic started by: tutone on June 09, 2005, 03:41:55 am

Title: Admin Tool Update Photos Server Timeout Error
Post by: tutone on June 09, 2005, 03:41:55 am
After recieving the "Fatal error: Maximum execution time of 30 seconds exceeded" message... it would be nice to have a button to continue where the process left off when the server timed out. I use some genealogy software that has this feature.  It keeps processing on the server... when the server times out... you get a continue button.  (http://lythgoes.net/genealogy/software.php)  I know that you can set the size of files to process so as to limit the timeout... i found that even if i put a low number like 3 or 5 it still times out.  It really sucks when it does time out because then you have to start the process all over again with that album that you were working on.  This is the real issue.
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Joachim Müller on June 09, 2005, 07:27:08 am
I agree that such a feature would be usefull. Using batch-add, you can refresh the page to continue. When using http uploads, the uploads are handled by the browser and server, coppermine can't interact. I'm not sure how to implement such a feature. Code submission would be welcome.
Using the admin tools to rebuild the thumbs and intermediates there should be an option to do what you request. Marking as valid and moving accordingly.
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Nibbler on June 09, 2005, 01:40:10 pm
Could use code from the 'batch-add with automatic alb/cat structure' mod for this, it uses register_shutdown_function() to output a continue button. The function is triggered when the time limit is reached.
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Stramm on July 02, 2005, 09:00:48 am
I've already written that for CPG1.3x. It's opening a new window and calling itself over and over again till the batch process is finished. So if you have huge amounts of images you won't have to sit there and click 'proceed' hundresds of times. And when it should timeout once you just refresh the browser window.
The same concept's using my massmail mod too...

 If anyone needs it I could post it in the mod forum
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Joachim Müller on July 03, 2005, 11:39:53 am
yes, please go ahead and post it on the support board, a moderator will move the thread to the mods board accordingly (as you can't start new threads on the mods board).
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: bwschult on August 22, 2005, 06:43:14 pm
Could someone please point me to Stramm's mod?  I'm also frustrated with constant timeout errors from the admin tools resizing and I haven't found any follow-up to this topic.

thanks,
bws
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: bwschult on August 22, 2005, 07:17:04 pm
Ok, I found the mod... but it didn't work for me.  I made the changes, added the file, and I still get this error after updating the database:

Fatal error: Maximum execution time of 30 seconds exceeded in /hsphere/local/home/bwschult/brentschultz.com/allphotos/include/picmgmt.inc.php on line 217

I've also changed my browser (firefox) timeout numbers.

Despite these modifications, I get the same errors each time.  Any suggestions?  I'm only able to change about 15 images (normal and thumb combined) at a time.  And since there is no way to continue the function, I change the first 15 files each time and the rest go untouched.
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Stramm on August 22, 2005, 07:42:46 pm
the mod isn't standalone... I was to lazy for that. You'll need to have the watermark mod installed

edit: and even with my mod you'll have to reduce the number of images to modify in a batch. Usually I set it to 5. You just get rid of clicking continue when one batch's finished. And if the stuff really times out you click refresh and restart where it stopped working (and you too can reduce the number of pics when modifying the link in the addess field in case of a timeout)
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: bwschult on August 22, 2005, 11:55:45 pm
Great, I've got it working.  But is there a way to make it auto-refresh?  I can update 15 thumbnails at a time, but then I have to click the "Process More Images" button to do the next 15.  Not too big of a deal, but it would be nice to just click "start" and then let it cycle through all the images, 15 at a time, without timing-out.

Thanks for the mod!
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Stramm on August 23, 2005, 08:39:48 am
you are still talking about my mod?? that one's auto refreshing. If so then check util.php again if you did all necessary changes
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: bwschult on August 23, 2005, 04:26:27 pm
Yes, I am talking about your timeout mod, Stramm.  I have made the following changes:

1) Added the new include/picmgnt.inc.php
2) Added updatethumbs.php to cmg directory
3) Made the recommended two changes to util.php  (the part of the util.php with the changes is shown below)

Currently, this simply reloads the util.php page.  No thumbnails are touched.  If I go back to my original util.php, I can update 5 thumbs at a time, but I have to press the "process more images" button each time to do more. 


Code: [Select]
(4) ';
    printf($lang_util_php['instruction_press'], $lang_util_php['submit_form']);
    print '
';

    print '</td></tr>';
    endtable();
    print '<br />
<form action="updatethumbs.php" method="post">
';

    starttable('100%', '<input type="radio" name="action" checked="checked" value="thumbs" id="thumbs" class="nobg" /><label for="thumbs" accesskey="t" class="labelradio">' . $lang_util_php['update'] . '</label> (1)');
    print '
<tr><td>
' . $lang_util_php['update_what'] . ' (2):<br />
<input type="radio" name="updatetype" value="0" id="thumb" class="nobg" /><label for="thumb" accesskey="t" class="labelradio">' . $lang_util_php['update_thumb'] . '</label><br />
<input type="radio" name="updatetype" value="1" id="resized" class="nobg" /><label for="resized" accesskey="r" class="labelradio">' . $lang_util_php['update_pic'] . '</label><br />
<input type="radio" name="updatetype" value="2" checked="checked" id="all" class="nobg" /><label for="all" accesskey="a" class="labelradio">' . $lang_util_php['update_both'] . '</label><br />
' . $lang_util_php['update_number'] . '
<input type="text" name="numpics" value="' . $defpicnum . '" size="5" /><br />
' . $lang_util_php['update_option'] . '<br /><br />
</td></tr>';
   

endtable();

print '<h2>'.$lang_util_php['select_album'].'</h2>';

   if (defined('UDB_INTEGRATION')) {
       udb_util_filloptions();
   } else {
       filloptions();
   }

   print '<br />

<form action="' . $phpself . '" method="post">';

Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: Stramm on August 23, 2005, 08:24:17 pm
have you seen that you have 2 submit buttons now?? One below the thumb, normal update and one at the bottom of the page... the top one is for updating the images... and it's only doing that (using updatethumbs.php and reloading this one)
The one at bottom's doing the rest stuff (orphans, rename etc) using util.php
Title: Re: Admin Tool Update Photos Server Timeout Error
Post by: bwschult on August 23, 2005, 09:41:42 pm
Ok, after a little more work, I figured it out.  Thanks for your help and your mod.