Fatal error: Allowed memory size of 67108864 bytes exhausted

General Forum
10 Books A Home
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 21 Apr 2013, 03:20

Fatal error: Allowed memory size of 67108864 bytes exhausted

Post by 10 Books A Home »

When I try to upload a photo the following message displays in the dialog:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 15044 bytes) in /home/content/88/5699688/html/administrator/components/com_phocagallery/libraries/phocagallery/image/imagemagic.php on line 214

Can someone help me? Thanks!
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Fatal error: Allowed memory size of 67108864 bytes exhau

Post by Benno »

Hi,
see: 5. Allowed memory size of ... bytes exhausted ... https://www.phoca.cz/documents/50-phoca/ ... al-advices

Kind regards,
Benno
jedivader
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 14 Jul 2013, 21:47

Re: Fatal error: Allowed memory size of 67108864 bytes exhau

Post by jedivader »

This is actually a problem with the image resolution, not its byte size.

Creating thumbnails requires placing the image in the server memory, where at one point it's in the form of a bitmap. So the actual file size doesn't really matter, it's the resolution that's the limiting factor (the resulting bitmap will be the same for any given resolution, no matter the image format, compression, or byte size). The memory is limited by the php variable memory_limit. 67108864 bytes is 64M.

I tested this to confirm it:
I tried generating a thumbnail from a 128KB JPEG image with a 4000x4000px resolution - no joy - Allowed memory size of 67108864 bytes exhausted error.
Then I tried generating a thumbnail from a 4.7MB JPEG image with a 3000x3000px resolution - success.

To fix this issue, one should increase the value of the memory_limit php variable on their server. This is usually possible to achieve from the cpanel. Or one could ask their hosting provider to do it for them.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fatal error: Allowed memory size of 67108864 bytes exhau

Post by Jan »

Hi, yes, but to simplify for users who do not have technical skills, in most of cases, image (jpg, png) which has large resolution, has large size (we are speaking about images - photos, mostly high resolution = large size (of course, e.g. white gif image which is 5000x5000 can be saved in e.g. 50kb) but we are speaking about photos in image gallery. :idea:

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