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

XF 1.3 File size issue

Discussion in 'Troubleshooting and Problems' started by rwm1962, Sep 16, 2014.

  1. rwm1962

    rwm1962 Active Member

  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to increase post_max_size and upload_max_filesize in php.ini.

    Navigate to admin.php?tools/phpinfo to check what they are currently.
     
  3. rwm1962

    rwm1962 Active Member

    They are 128M & 2M currently

    Can you advice what I would I need to change them to? Is this change within my XF directory or server side?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I would suggest 20M for the one which is currently 2M.

    Ideally change it in php.ini if you can, otherwise you can edit .htaccess, for example:
    Code:
    php_value upload_max_filesize 20M
    php_value post_max_size 20M
     
  5. rwm1962

    rwm1962 Active Member

    Sorry - had a look but can't find it. Where is php.ini?
     
  6. rwm1962

    rwm1962 Active Member

    Server side? /usr/local/lib/php.ini

    or just add to the end of htaccess?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Either one will do.
     
  8. rwm1962

    rwm1962 Active Member

    I just pasted it onto end of htaccess & no difference. I'm currently on shared hosting. Would that matter? Would my htaccess overide php.ini?

    It seems I can't post images over 2mb
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    It may be easier to just contact your host and ask them to increase the value for you.
     
  10. rwm1962

    rwm1962 Active Member

    Sorted - many thanks. My XF site was calling on the file on the shared. I have my own custom php.ini on another domain already set to 20M (my host reminded me). Copied across to the XF folder & it's working great. Just uploaded 8mb image & happy to see it resized down to 1.8mb. Not be that mad on the live site!
     
  11. AndyB

    AndyB Well-Known Member

    There is one other setting you should be aware of. Due the very large files modern cameras create, you will want to add this to your config.php file:

    $config['maxImageResizePixelCount'] = 30000000;
     
  12. rwm1962

    rwm1962 Active Member

    Thanks Andy - for info, what does that do that php.ini & the ACP doesn't? I'm all for users being able to upload huge files as long as they are well optimised automatically in the process.
     
  13. Brogan

    Brogan XenForo Moderator Staff Member

Share This Page