• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Memory error during attachment import

Tigratrus

Well-known member
#1
The rest of the import has run smoothly but I'm getting:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 34028 bytes) in /home/ikeafans/public_html/xf/library/XenForo/Image/Gd.php on line 57


I went in and bumped up the memory_limit in the php configuration to 256M, rebooted and verified that the new memory_limit took effect, but I'm still getting the same error. Any ideas?
 

Mike

XenForo developer
Staff member
#2
XF sets the memory limit to 128M itself. You can set it in config.php:

ini_set('memory_limit', 256 * 1024 * 1024);

Do you have a giant image perhaps? :)
 

Tigratrus

Well-known member
#3
I was afraid it was being set locally ;). Thx Mike!

Yah, we've got quite a few big images. We have a ton of users that just *don't* have the first clue about how to resize images, that's one of the reasons I'm sooooo big on the idea of an image upload client (like plupload by moxiecode) that resizes the image on the workstation rather then sending the ginourmous image up to the server to be resized. :)

I've got two separate config.php files in the XenForo upload folder:
/upload/library/Zend/config.php
/upload/library/Zend/Oauth/config.php

But I'm guessing you're talking about the one in
/library/config.php in the installed on the server structure?
 

Tigratrus

Well-known member
#5
Yup... Putting that ini_set in the /Library/config.php sorted it. :) Thx!

How about building the eventual gallery system so that admins can use plupload if they want to? The huge improvement in response time for users if they aren't sending up 2-5 meg images that they took with their smartphones would be soooo worth it! ;). Sorry, just couldn't resist putting in a plug for a better uploader :).

Should have mind you, but... ::sigh:: Oh, the humanity!
 

Tigratrus

Well-known member
#7
But if you look at the various ways it can be implemented Flash is NOT required. It also works via HTML5, Silverlight, Gears, Browser Plus.

The BIG point is having something that resizes images on the desktop, that is NOT a minor user experience tweak. For a very large number of users it's a game changer. We've got a huge number that CAN'T resize images locally, they don't even know what that means. And doing it all on the server means they have to upload ginourmous files... And that makes the upload experience VERY painful for them.
 

Tigratrus

Well-known member
#8
Sorry... I really am sorry it suck so much of Kier's time up :(, from the demo and the JQuery upload widget it seemed like an excellent fit.

::SIGH::

Just dealing with the loss of the workstation side image resize. I really can't express enough how big of an issue that is for so many of our members.
 

Brogan

XenForo moderator
Staff member
#9
For the record, I am able to upload 6MB images to my forum, despite the file settings being set as follows:
Maximum Attachment File Size (KB): 512
Maximum Attachment Image Dimensions: 1440 x 960