Having trouble with uploads: Fatal Error
3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 4, 2014 (RSS)
By kevbarker - June 2, 2014
I am having trouble with uploads and am getting a Fatal error. Allowed memory size of 134217728 bytes exhausted (tried to allocate 15364 bytes in /home/kevbarker/raingonc.com/admin/lib/image_functions.php on line 100.
Server Upload Limits are as follows
max_input_time: -1
post_max_size: 100M
upload_max_filesize: 100M
The photo I was trying to upload: (just one photo ) is 6.74 MB
Shouldn't the above settings allow for one photo of 6.74 MC to be uploaded?? Is it a problem with the server? It seems to work fine with smaller photo filesizes.
I am hosted with Dreamhost.
See attached screenshots.
I would appreciate input and suggestions. My client has been trying to upload photos with no success and is not happy.
Thanks
Kevin
By Steve99 - June 4, 2014
Hi Kevin,
File size itself doesn't directly equal the amount of memory needed. The factor here is the image resolution.
The most straight forward article I've seen on this topic regarding the GD library and memory:
http://alexrabe.de/2008/05/13/understand-gd-library/
Here is a recent example I used with a client of ours. Let's say you have a photo that is 4.3MB file size, but the resolution actually equates to 5,920 x 7,714. This would actually translate to over 130MB of memory needed.
In photo editing programs such as Photoshop, you can see the sizes in the bottom of the window (generally displayed like this: 4.3MB/130MB).
Hope this helps.
Best,
Steve
By kevbarker - June 4, 2014
Steve,
Thanks for taking the time to reply and sharing the article with me. It makes sense... I was able to finally get things going. I was resizing the photo (CMSB section editor upload) down to Max H 960 X Max L 960 and it wasn't until I changed that setting to 1600 X 1600 along with changing memory in php-ini on the web server that the fatal error went away.
Kevin