Solved: Creating of thumbnail

Phoca Gallery - image gallery extension
Geforce
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 16 Jul 2010, 14:44

Solved: Creating of thumbnail

Post by Geforce »

Hey all,

maybe someone can help me.
I have installed Joomla 1.5.19 with the german language pack and the latest Phoca Gallery Pack.
When i am trying to create thumbnails i get this error message:

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

this is my Info Check:

Image

I would be very happy if someone could give me an idea how to solve this problem.

Thanks
Last edited by Geforce on 18 Jul 2010, 03:07, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49299
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Failed: Creatin of thumbnail

Post by Jan »

Hi, in such case you need to check:

- your memory on your server
- image size, try to resize it down

as your GD is not able to produce thumbnails because of memory :-(

Jan
If you find Phoca extensions useful, please support the project
Geforce
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 16 Jul 2010, 14:44

Re: Failed: Creatin of thumbnail

Post by Geforce »

I checked the value of memory limit now.
My PHP info says that i am allowed to use 40M.
But how can i change it.
The Support told me to create a php.ini in the directory where the script is working and to change to amount of allowed memory.
But i dont really know how to create such a file.
Maybe you can post me the code i need to put in this file.

Thanks for ur fast reply.
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Failed: Creatin of thumbnail

Post by imperialWicket »

This is more of a PHP-specific topic than Phoca Gallery related. Nonetheless, add a file named php.ini to your server in the directory where the script executes (or some higher-level directory - assuming there isn't a php.ini to override it in a lower directory...), and add the following text to the file:

Code: Select all

memory_limit = 128M 
128 works reliably for me up to several hundred images. Beyond that number I start to encounter memory issues again.

Hope this helps.
Geforce
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 16 Jul 2010, 14:44

Re: Failed: Creatin of thumbnail

Post by Geforce »

now we solved the problem...

there was two mistakes.
1. My Hoster had to set the memory_limit up to 128M and
2. i had to correct a line in the php script of phoca gallery. (imagemagic.php)

if ($memory < 50) {
ini_set('memory_limit', '128M'); <- I had to set this value on 128M and not limmited on 50M
$memoryLimitChanged = 1;

Now thanks to all supporters ^^

great work ...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49299
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Solved: Creating of thumbnail

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49299
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Solved: Creating of thumbnail

Post by Jan »

Hi, the script is trying to increase memory while thumbnail creating, but if this is forbidden by server settings, there is no way to increase. :(

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