Thumbnail creation problem, size limit

Phoca Gallery - image gallery extension
simonslee
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2010, 15:31

Thumbnail creation problem, size limit

Post by simonslee »

I'm uploading a large batch of photos into one category and it keeps crashing at the 91st photo with the following error:

Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 17472 bytes) in /home/idunder1/public_html/administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

If I turn off thumbnail creation I can see that all my photos have been allocated but I cant find a way to recreate thumbnails for the photos that failed.

As soon as I have thumbnail creation back on, if I try to go to images and view any image after 91, it crashes with this same error message.

Is this some server setting, or is there another way to handle crashing of thumbnails?

When it crashes if I hit back in the browser it doesnt go back to a page I can save again from (like it suggests on your site) it goes right back to the images page.

I am really stuck?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation problem, size limit

Post by Jan »

Hi, if your server (GD library) has problem with creating the thumbnail from some image you need to remove it, or change it before trying to create thumbnail again.

Jan
If you find Phoca extensions useful, please support the project
xt4london
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 23 Nov 2010, 00:55

Re: Thumbnail creation problem, size limit

Post by xt4london »

I'm afraid I've had exactly the same error:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 14172 bytes) in /home/t****com/public_html/administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

I have tried Jan's suggestion above, only for the problem to still be there. Weirdly this is a recent phenomenon. Any other useful suggestions would be most welcome.
xt4london
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 23 Nov 2010, 00:55

Re: Thumbnail creation problem, size limit

Post by xt4london »

OK, I have discovered a solution for this problem and it involves creating a php.ini file in the administrator directory of your joomla site (name the file php.ini and put it in your administrator folder of your joomla installation)
then paste the following into the file:
memory_limit = 80M
That should be more than enough memory (I tried it at 32M at first but that was not enough so increased it until it worked).

Save the .ini file and remember to set the parameters in phoca gallery to allow the creation of thumbnails and you should be away.

It worked for me, let's hope it works for others. I'd be grateful for feedback from others, just in case I've done something like compromise my site's security in any way.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Thumbnail creation problem, size limit

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply