XF 1.2 Upload File is Not Working?

Jericho M

Active member
Hi!

Need help. I just tried to upload file to my post but apparently it does not work. Below is the screenshot. I got no error message but every time I upload a picture or file it only gives me a long loading like what you see below.

I try to refresh the page, Log out and log in again try to upload picture but same problem. Very long loading.


screenshots.webp

I am expecting for this result after a few loading.
screenshot.webp
 
here are other examples, over and over again the same error message from members trying to upload pictures. It does not seem to be dependant on the "around 91M" setting as suggested before. The amount of memory exhausted varies, but clearly the pictures aren't that big, it must be the memory needed by XF to resize the image or something?

ErrorException: Fatal Error: Allowed memory size of 68022648 bytes exhausted (tried to allocate 21233665 bytes) - library/XenForo/Image/Gd.php:297
Generated By: ... Sunday at 11:17 PM

ErrorException: Fatal Error: Allowed memory size of 68022648 bytes exhausted (tried to allocate 21233665 bytes) - library/XenForo/Image/Gd.php:297
 
i did set my settings to exactly what brogan suggested and that did not fix the issue. would you guys mind telling me what settings you have here at this forum?Your uploads here seem to be working while my forum is not. maybe that will solve this issue.
 
That's roughly only 68MB of memory being allowed (I allow 256MB on my sites). I believe that XenForo really needs 128MB allocated.
What does your ACP -> Tools -> PHP Info show for memory_limit under the Core settings?
 
The issue is the amount of memory needed to resize the image. The larger the image dimension, the more memory required (around 6 bytes per pixel IIRC). If you're not resizing the image (as would likely be the case in WP), you won't have an issue.

It's almost certainly the memory_limit in php.ini (or some other configuration location). You can confirm the value for this under admin.php?tools/phpinfo . Your host should be able to guide you to how to increase it. Otherwise, you can adjust the setting I posted about to try to not resizing images over a certain size.
 
I'm sorry guys, phpinfo? I have gone into ACP, tools, and not finding any php or core settings anywhere...?

Should I be looking for this in the actual ACP, or in my server file database somewhere? There is no php type option visible in my ACP of the XF software that I can readily locate.

I appreciate your time and help with this.
 
Last edited:
wow, surprised you would not have a link to php info in the ACP if it is something that needs to be checked...I agree wholeheartedly with the other thread that something like this should just be written into the software so admin can simply click to it out of the acp directly. Not everyone who purchases the xf software is website/php savvy right out of the box, some details about things like this would be nice in the manual or say an intro to Xf type thread. Would save a lot of frustration and time for some people I imagine.

Anyways, after quite a bit of searching around I finally figured out how to access this based on various threads from other members and it shows my memory limit is set at 64M.

I will contact my host again to see if they can help me increase this. Thanks for all your help.
 
Haha, awesome, thanks Brogan.

Ok, I have finally got this working, so for reference for any future XF software purchasers that run into this problem, the solution in this case was...

- I changed various settings in my server, memory limit 64M to 128M, php versions native to regular as per my hosts suggestions, max upload sizes there, etc, etc and have finally got this working.

One last question to you all...

In switching all of these settings, is there some detriment to the sites function that might occur? Persumably there was some reason for these initial settings on my server, should I be concerned now about my site being slower, crashes, etc, etc...?

I thank you for all your help.
 
I'm sorry guys, phpinfo? I have gone into ACP, tools, and not finding any php or core settings anywhere...?
Just noticed that you were running 1.2, and I don't remember if 1.2 had the PHP info in the tools area (think it did though)... but that was several revisions ago. You could always create your own php info file and call it from the browser. Simply create a new file ending in the .php extension and place the following in it
Code:
<? phpinfo(); ?>

Then browse to your site/whatever.php and it will show your php settings.
 
Top Bottom