Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

File upload size limit

What is the maximum size of file upload using the File upload plugin? How can this be controlled?

Best Answer

  • ChanuxChanux ✭✭
    Answer ✓

    go to your forumfolder/conf/config-defaults.php

    you can see a line like this $Configuration['Garden']['Upload']['MaxFileSize'] = '50M';

    50M is 50MB. change it that you want..

Answers

  • ChanuxChanux ✭✭
    Answer ✓

    go to your forumfolder/conf/config-defaults.php

    you can see a line like this $Configuration['Garden']['Upload']['MaxFileSize'] = '50M';

    50M is 50MB. change it that you want..

  • My setting was also defaulted to 50 MB, so I increased it to 500 MB. I still cannot upload files larger than 2 MB in the forum I'm running however. Also, shouldn't this configuration line appear in your config.php file, which is the one your supposed to modify anyway for custom settings?

  • If you are looking at old discussions for such a problem, that one might help you:


  • I don't see the php.ini file anywhere in my installation. More help or details would be appreciated.

  • charrondevcharrondev Vanilla Staff

    It’s worth noting if you are using nginx to connect to php-fpm, that has it’s own upload size settings.

    So in total you may need 3 configs set. Nginx, PHP, and Vanilla.

    @BigAl it’s pretty much impossible to give any advice here without knowing a lot more about your system, which it sounds like you don’t have the best handle on.

    I’d recommend something like the digital ocean guides for setting up PHP & nginx if you actually want to become a bit more knowledgeable about this type of system setup. Even if in the end you decide to stick with managed hosting, setting it up for yourself can give you a lot of valuable knowledge.

  • Thanks for the insult charrondev, even though perhaps you didn't intend it to come across that way. I'm a retired MSEE, having worked on spacecraft and things of this nature. So I'm not an expert software developer. I'm sure I've done a lot more interesting things in my past than you have though.

    I'm using the default installation of Vanilla. I don't know if I'm using nginx to connect to php-fpm but thanks for the tip I suppose.

  • @BigAl the php.ini is not a part of Vanilla. It is a PHP setting which best is set on the server level, although you can set it on a directory level. If you've never heard of php.ini the most straightforward way would be to ask your webhoster how to do it.

    I'm sure charrondev didn't meant to sound insulting.

  • Thanks R. J.

  • charrondevcharrondev Vanilla Staff

    @BigAl sorry, I didn’t mean to come off that way. My comment was actually quite similar to @R_Js.

    You’re web host is the one tell you where that file is, although you may not have access depending on your host. I mentioned digital ocean because they give you cheap, fully controllable servers and great guides on how to setup things like PHP and nginx.

  • My hosting service (Lunarpages) has been fine for me at least a decade now. File uploads are not a problem to my web site at all. I am only limited within the Vanilla forum software, so I believe this is an issue directly related to that software. I should have a configuration setting that actually works. If not, that is a bug in the Vanilla software.

  • You have admitted that web developing is not what you are good at. So you might trust those who spent more time with that...

    Create a file called pi.php in the root of your forum folder and insert the following:

    <?php
    echo phpinfo();
    

    Save that file and go to yourforum.com/pi.php, search for "upload_max_filesize" in there and you will find what maximum upload size is possible from server side. But I bet it will be "2M".

    You might be able to change that setting somehow but the best way would be to ask you provider, which you apparently haven't done.

    Just to give you possible options:

    1. You do not have permission to change that on your own and your provider needs to increase that limit
    2. You have the option in your web space config frontend (whatever that might be) to edit a php.ini per virtual host and you can set it there
    3. You have to edit the htaccess in your frontend
    4. You need to manually create a php.ini file or add a line to the htaccess file


    You see? At least four options, not possible to decide from what we know by now, nothing new.

  • Thanks for the ideas. I shall look into it tomorrow. Right now I'm heading out the door to attend a Three Dog Night concert.

Sign In or Register to comment.