5 January 2010 at 2:28pm
(Last edited: 5 January 2010 2:28pm),
I've read the other posts about this error, but am not clear about how I should trouble shoot this. My client uploaded some new images to her gallery and received this message:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 11312 bytes) in /home/content/c/a/t/host/html/sapphire/filesystem/GD.php on line 24
I took a look at all of the images she uploaded yesterday and appeared to be of a normal size. I noticed that all of the file name began with a dash, so I deleted all of the images she attempted to upload (from the gallery and from the folder in files & images); saved and flushed and still receive the above error message.
I'm not sure where to go with this short of getting rid of the gallery and rebuilding it. Advice would be appreciated!
23 February 2010 at 10:18am
(Last edited: 23 February 2010 10:18am),
Sophie, this issue occurs every now and then with my SilverStripe projects when clients upload images with a very high resolution (say, 6500 pixels x 4000 pixels). This might be your problem?!
All, is there a solution to this problem? Every now and then customers try to upload photo's with 6000+ pixel dimensions and this error occurs. Additionally: photo's can no longer be selected when adding images and the imagedom breaks. Please help. Changing the memory thing in htaccess doesn't change anything...
26 February 2010 at 11:59pm
The fix suggested above doesn't work for my situation: Uploading an image with dimensions 8000x11000 pixels:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 33072 bytes) in /.../public_html/sapphire/filesystem/GD.php on line 22
I know that those dimensions are absurd, but currently I don't have a solution to prevent users from uploading such an image. So I'm with Ryan, although I'm not the hard-core programmer that's able to develop such improvements...
Seriously, unless your users are uploading comps for billboards, there's no excuse for allowing an image of that size to be uploaded to your sever. You're playing with fire. Crank down your file size limit..
27 February 2010 at 5:15am
Yeah, we need something which will detect the ridiculously large dimensions and halt the upload process. I talked to a sys admin friend of mine, he says it's because the GD library chokes on such a large number of pixels. Switching to ImageMagick or another image library is recommended, or in the very least, a limit on the image dimensions and file size.