Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

GD Image library tripping memory limit errors


Go to End


2 Posts   1430 Views

Avatar
Ryan M.

Community Member, 309 Posts

26 February 2010 at 10:31pm

Seems the GD image library can't handle all the photo uploads on our site so the server's been throwing memory limit errors. I upped memory to 128 and that fixed things for a while until the error started surfacing again. I suspect that the functions aren't releasing the memory upon completion of the process, thus accumulating until it trips the memory limit error. Can anyone confirm that it does this, or not?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

27 February 2010 at 3:13am

GD functions are very memory intensive. Make sure you're exerting some level of control over your user input so you can't save yourself these headaches.. I recommend using the file_size_limit parameter to keep large files out. By default that is set to the value of your PHP.ini upload_max_filesize, but it can certainly be lower if you need it to be.