Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 186
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 165
Total: 165

Author Topic: Regenerate thumbnails  (Read 4703 times)

0 Members and 1 Guest are viewing this topic.

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Regenerate thumbnails
« on: December 14, 2009, 04:56:13 am »
Hello SMFHacks,

I want to regenerate all the thumbnails in the gallery but there are a lot of them (8827) and when I try to regenerate them, the first 70 thumbnails are correct regenerated but then I get a server script timeout 500 from my host. Is there a way to ignore this server script time? So I can regenerate all the thumbs?

Thanks,
Vincent

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Regenerate thumbnails
« Reply #1 on: December 14, 2009, 07:50:34 am »
I think set the script timeout to either 300 or 600 seconds
To increase open the Gallery.php or Gallery2.php in the sources folder
Find
ini_set('max_execution_time'

And change the number to 0 for infinite
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Regenerate thumbnails
« Reply #2 on: December 14, 2009, 08:26:30 am »
I think set the script timeout to either 300 or 600 seconds
To increase open the Gallery.php or Gallery2.php in the sources folder
Find
ini_set('max_execution_time'

And change the number to 0 for infinite

I set it to '0'  but still the error 500, same amount of images resized.

VIncent

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Regenerate thumbnails
« Reply #3 on: December 14, 2009, 06:50:59 pm »
Try adding
Code: [Select]
@apache_reset_timeout();
Inside the regenerate loop
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Regenerate thumbnails
« Reply #4 on: December 15, 2009, 11:15:05 am »
Try adding
Code: [Select]
@apache_reset_timeout();
Inside the regenerate loop

With this added to the script I only see a white page....

This is the place where I added it (//I'd removed the rest of the script):

Code: [Select]
function ReGenerateThumbnails2()
{
global $smcFunc, $txt, $boarddir, $modSettings, $gd2, $sourcedir;

$id = (int) $_REQUEST['id'];

isAllowedTo('smfgallery_manage');

// Check if gallery path is writable
if (!is_writable($modSettings['gallery_path']))
fatal_error($txt['gallery_write_error'] . $modSettings['gallery_path']);

// Increase the max time to process the images
@ini_set('max_execution_time', '0');
        @apache_reset_timeout();


Edit: Please don't wast your expensive time for this (if it takes to much time). We have about 450 uploads per month so the 'to small thumbs' will disappear in a short time from the screen. They are still in the gallery but that's no problem.

Thanks, Vincent
« Last Edit: December 15, 2009, 12:29:05 pm by Vincent Volmer »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Regenerate thumbnails
« Reply #5 on: December 15, 2009, 06:23:45 pm »
I might like a batch screen to process x amount per pass then refresh the screen to go on to the next
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Vincent Volmer

  • Hero Member
  • *****
  • Posts: 519
  • SMF 2.0.17
    • View Profile
    • Digiscrap.nl
Re: Regenerate thumbnails
« Reply #6 on: December 16, 2009, 08:00:52 am »
I might like a batch screen to process x amount per pass then refresh the screen to go on to the next

Yes, that should fix it!

Thanks for the support!

Vincent

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
4323 Views
Last post June 18, 2011, 06:25:32 pm
by SMFHacks
2 Replies
3359 Views
Last post April 26, 2012, 04:43:00 am
by davejo
2 Replies
2949 Views
Last post December 28, 2013, 08:06:36 pm
by TeraS
0 Replies
2562 Views
Last post April 07, 2014, 04:07:06 am
by Michel68
2 Replies
2451 Views
Last post February 26, 2018, 09:48:44 pm
by UCAPhantom

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal