XF 1.1 Image uploading not working with >2MB files

ibenick

Active member
I've set my maximum image upload size to about 8MB but users are unable to upload anything bigger than 2MB or so. It appears to upload successfully but the Insert Thumbnail/Full Image buttons just never appear. Pressing the 'Insert every image as a..." button doesn't do anything. Any ideas what the problem is? Like many people have posted about, I need to be able to have my users upload large files (5-7MB). Even if there is no server side resizing, shouldn't it still be accepting these files if I've designated it as an acceptable size?

Screen shot below. It just hangs right here. Sometime sit leaves one at 100%, sometimes it finishes up.
uploadissue.webp
 
Does the full-sized image upload successfully? Does the full image show in the post? Maybe it's just a problem with the image library and thumbnails.

Also, here are some server settings that may be limiting:

PHP:
max_execution_time
memory_limit
post_max_size
upload_max_filesize

MySQL:
max_allowed_packet
max_packet_size
wait_timeout
 
I did some digging around and determined that MySQL has these settings:

max allowed packet: 16,777,216
wait timeout: 180
I couldn't find the PHP setting so I've sent a message to my hosting company on that.

The files do all upload and when the post is created, they appear as attachments. So does that just mean it's an image library issue then? Any suggestions on fixing that?
 
Right, thumbnails don't work. When the users posts the thread it just shows all the attachments with file name and file size. No way to insert them into the posts and no thumbnails.
 
Okay, switched to the other image library. The images uploaded about the same and one of them got to the point where it gave me the insert buttons. See attachments.

failupload.webp

otheruploader.webp
 
My host got back to me with my PHP settings which are:

Here is a list of default values for our PHP configuration:
max_execution_time 30
memory_limit 64M
post_max_size 32M
upload_max_filesize 32M
 
Right, thumbnails don't work. When the users posts the thread it just shows all the attachments with file name and file size. No way to insert them into the posts and no thumbnails.
See this from the FAQ related to large images and thumbnails:

Why can I upload an image, even though it is larger than the maximum file size (KB) permitted?
Uploaded files are first resized based on the maximum physical dimensions (pixels) set in the ACP -> Options -> Attachments: Maximum Attachment Image Dimensions. If the resized image is below the maximum file size (KB) limit, then it will be allowed.
Note that with XenForo 1.1 and above, images of 16 megapixels and over will not be resized; this is to prevent fatal errors due to running out of memory. If the Maximum Attachment Image Dimensions combined total (width x height) is set lower than this limit, images greater than 16 megapixels, or with a dimension larger than that permitted, will be rejected with an error stating The uploaded image is too big. If the Maximum Attachment Image Dimensions combined total (width x height) is set to 0 or greater than 16 megapixels, the image will appear as an attachment without a thumbnail.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180445
 
If anyone ever writes up an add-on or something to get around this, I'll be in line to pay. Many users have issues with doing their own resizing which ultimately means less good content on my site.
 
**** FIXED *****

I recently moved hosting companies from one VPS to Linode. After the move everything was working fine, but I started having members complaining that some images were not uploading properly.

They would upload an attachment (image) and the progress bar would hit 100% and then nothing would happen.

After a bunch of researching, I changed the following settings for PHP and MySQL to match my previous VPS. I'm unfortunately not sure which one was successful in fixing the problem, but wanted to post here (and a few other related threads) to share that this worked for me!

pico /usr/local/lib/php.ini
memory_limit = from 32M to 158M


pico /etc/my.cnf
max_allowed_packet=268435456 to max_allowed_packet=64M
wait_timeout=10 to 45

(make sure to restart your services after you make the changes)
 
Last edited:
Top Bottom