Reply to Going to timeout while creating thumbnails

Going to timeout while creating thumbnails new!
by Sumit, 9 years, 10 months ago
Hi,

I used class.uplad.php in my script. Everything is working perfectly. Butr after a while it is going to timeout. I am handling almost 10000 thumbnails.

And the server where i am running this code, is a shared server. Some important php.ini values are as follows :
memory_limit = 128 MB , max_execution_time = 300, max_input_time = 600, max_file_uploads = 20.

Here is my code below
$foo = new Upload($img_dir . ORIGINAL_IMAGE_PATH ."/". $prod['image_folder'] . $prod['products_image']);
if ($foo->uploaded) {
	$foo->image_resize          = true;
	$foo->image_y               = SMALL_IMAGE_HEIGHT;
	$foo->image_x               = SMALL_IMAGE_WIDTH;
	$foo->Process($dir_dest_small);

	$foo->image_resize          = true;
	$foo->image_y               = PRODUCT_IMAGE_HEIGHT;
	$foo->image_x               = PRODUCT_IMAGE_WIDTH;
	$foo->Process($dir_dest_display);
	
	$foo->image_resize          = true;
	$foo->image_y               = LARGE_IMAGE_HEIGHT;
	$foo->image_x               = LARGE_IMAGE_WIDTH;
	$foo->Process($dir_dest_large);
	
	$foo->image_resize          = true;
	$foo->image_y               = OPI_IMAGES_MINHEIGHT;
	$foo->image_x               = OPI_IMAGES_MINWIDTH;
	$foo->Process($dir_dest_adminthumb);
	
	$foo->image_resize          = true;
	$foo->image_y               = SMALL_IMAGE_HEIGHT;
	$foo->image_x               = SMALL_IMAGE_WIDTH;
	$foo->Process($dir_dest_adminpreview);
	
	unset($foo);
}

Is anything wrong in my code ? Please suggest.

Thank you in advance.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important