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

XF 1.4 Cannot upload avatars or images

Discussion in 'Troubleshooting and Problems' started by Radiola, Jun 20, 2015.

  1. Radiola

    Radiola Member

    I've read through some of the threads on this but I haven't quite figured this one out.

    We've had 1.4 running for about 6 months since conversion. We have never had avatar or image upload problems before. Then about a week ago we've run into the situation where every time someone tries it tells people that the "image is too large".

    We have checked with the server and we are no where near maxing out with our usage. In fact the CPU shows hardly any use at all. The problem does not seem to be with the server.


    So, in admin panel I changed the size of the image that people can upload to a max size, like 100,000. No change.

    I have read that maybe I need to change something in the php.ini file and if I knew where to find that I could do that. (Haven't looked for a couple of days-way too busy giving midterms).

    So I need to figure out what the problem is and what I can do to avoid the problem in the future (and if this needs to be merged with some other previous thread that's fine with me).
     
  2. Mike

    Mike XenForo Developer Staff Member

    "Image is too large" doesn't appear to be text that appears in XenForo. What is the exact error message being received?
     
  3. Tracy Perry

    Tracy Perry Well-Known Member

    There are settings in nginx config that will also control some factors of uploads (if you are using nginx). As you found, there are also settings in the php.ini that control upload sizes.

    These are your typical php.ini ones you need to edit
    Code:
    ; Maximum allowed size for uploaded files.
    ; http://php.net/upload-max-filesize
    upload_max_filesize =
    Code:
    ; Maximum size of POST data that PHP will accept.
    ; Its value may be 0 to disable the limit. It is ignored if POST data reading
    ; is disabled through enable_post_data_reading.
    ; http://php.net/post-max-size
    post_max_size =
    Code:
    ; Maximum allowed size for uploaded files.
    ; http://php.net/upload-max-filesize
    upload_max_filesize = 
     
  4. Radiola

    Radiola Member

    @ Mike, message is:
    The following error occurred:
    The uploaded file is too large for the server to process.

    @Tracy Perry , where do I find the php.ini file? I can't find it.
     
  5. Tracy Perry

    Tracy Perry Well-Known Member

    Depends on whether you are on shared hosting or VPS/Dedi system. If on a VPS/Dedi, just log in and issue an updatedb and then locate php.ini.
    or you can always go to your ACP and pull up the php info page. It will tell you where the php.ini that is in use is located.

    This is what mine on my older server shows
    Screen Shot 2015-06-21 at 5.55.57 PM.png
     
  6. Mike

    Mike XenForo Developer Staff Member

    That does relate to the php.ini settings @Tracy Perry mentioned.
     
  7. Radiola

    Radiola Member

    Okay. got a file, what are the values I should add to try and fix this?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    What is the maximum size you want to allow?
     
  9. Mike

    Mike XenForo Developer Staff Member

    upload_max_filesize would generally be the main one, but post_max_size is also relevant. You should find the existing lines and you'll likely want to change the values.
     
  10. Radiola

    Radiola Member

    These are the values I put in:

    That's based on recommendations from here and from our host.

    @ Brogan, none of the files (images) that people have loaded are very large and we've asked people to only use .jpg and not .tiff etc. Most of the images are fake documents from scammers, photos of scammers, or photos used by scammers. antifraudintl.org. As I say, we haven't had any problem with Xf until a couple of weeks ago.
     
  11. Radiola

    Radiola Member

    I added a line based on another thread I read and my values now are:
    But I wonder if those are good (correct) values or if I really need to upload max file size to 200 or something?
     
  12. Tracy Perry

    Tracy Perry Well-Known Member

    Are you expecting 200MB photo uploads? Won't take to many of those and you will be into the GB range of storage for images/files.
     
  13. Radiola

    Radiola Member

    No, not expecting anything large. We try to limit that. But at this point we still can't even load avatars.
     
  14. Mike

    Mike XenForo Developer Staff Member

    Please submit a ticket with FTP details (and access to a user we can confirm the issue with) and we'll look into it.
     
  15. Radiola

    Radiola Member

    I can do that Mike but we have a lot of secure areas with criminal investigation sections and we're concerned about who would be looking in there.
     
  16. Mike

    Mike XenForo Developer Staff Member

    Are those sections of your XenForo install? In terms of a test user, ideally we'd just need access to be able to upload an attachment (or avatar). You can protect access to those areas.

    FTP would really just be to get more details about the error that isn't exposed in the UI.
     
  17. Radiola

    Radiola Member

    Yes, all part of the install. I started a ticket Mike, and there's a user ID to login with there. It worked all right for me. I'll see what others think about the ftp thing and see if there's some way to work that out.
     
  18. Radiola

    Radiola Member

    I wonder if I uninstalled some operating file?
     
  19. Tracy Perry

    Tracy Perry Well-Known Member

    For the script? If so, the ACP has the ability to check the files. It's in ACP -> Tools -> Diagnostics -> File Health Check.
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Did you see the latest response to your Ticket from Saturday?
     

Share This Page