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

XF 1.1 Image uploading not working with >2MB files

Discussion in 'Troubleshooting and Problems' started by ibenick, Jan 22, 2012.

  1. ibenick

    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.jpg
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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
     
  3. ibenick

    ibenick Active Member

    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?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can view your PHP configuration by visiting:

    admin.php?tools/phpinfo

    But the thumbnails don't work, right? Or does this problem only appear in the editor?
     
  5. ibenick

    ibenick Active Member

    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.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try using "the other" image library if it's available to you:

    Admin CP -> Home -> Options -> Attachments -> Default Image Processor
     
  7. ibenick

    ibenick Active Member

    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.jpg

    otheruploader.jpg
     
  8. ibenick

    ibenick Active Member

    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
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    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
     
    Jake Bunce likes this.
  10. ibenick

    ibenick Active Member

    Okay, so the short answer is that even if the file is only 3MB, if the resolution is too high, it's getting rejected.
     
  11. ibenick

    ibenick Active Member

    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.
     
  12. ProCom

    ProCom Active Member

    **** 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: Mar 8, 2016

Share This Page