[error] Can't upload 120mb zip file

  • Betroffene Version
    WoltLab Suite 3.1


    Hey guys,

    When I try to upload 120mb zip file i'm getting this error. I was able to upload a smaller 9mb file without problems.

    I set the permission to be max file size allowed 10GB

    I was browsing the forum, and discovered someone said a php.ini file may contain a max limit for uploading. I tried searching my FTP files for that and could not locate it.

    Anyone have any ideas?

    Best,

    Jonathan Weinberger

  • Update:

    Using "sudo locate php.ini"

    I was able to ssh and find the file. I modified the following properties:

    max_execution_time: I set it to 300

    upload_max_filesize: I set that to 10000M


    Still getting the same error

  • Please check post_max_size. It should be a little higher than upload_max_filesize.



    Thanks jacboy,

    I set it to 10128M

    Still the same error.

    In my adminCP, when I check the Php settings, although my php.ini file show changes on the server, that page isn't updating. Should it be?


    Current values:

    upload_max_filesize = 10000M

    post_max_size = 10128M

    max_execution_time = 300

  • Restart the server


    Hey,

    I restarted the server using: sudo /opt/bitnami/ctlscript.sh restart

    Restarted i believe successfully. Still getting the error.

    I am able to upload a 9mb zip file without problems. Just when uploading this 120mb file it's doing this.

  • Just testing out the file upload. I set the file system quota for user group "everyone" to 10000 MB

    It works with a

    - 9mb zip
    - 38.64 mb zip
    - 48.3 mb zip
    - 67.62 mb zip
    - 96.6 mb

    The next file size was 101mb and it errored out.

    So basically anything 100mb or over is erroring out.

    Maybe this gives some more insight since the php limitation was initially 40 and i can get away with 96.6 so maybe it's not related to the php ini afterall?

  • upload_max_filesize = 1000M
    post_max_size = 2000M
    memory_limit = 3000M
    file_uploads = On

    max_execution_time = 300

    Norwegian language files to (WSC 5.2 + 5.3 WSC 5.4 + 5.5 and The New 6.0 ) *no.xml* Unofficial Language Packs

  • Are those the PHP values really available to the WSC? It might be that there is another PHP config that defines the values for the WSC. To determin the values WSC can use, just checke the PHP within WSC. Go to ACP, on the ACP start page locate the PHP info line, and click on the version number. That will spawn a PHP info especially for WSC, and check the values of memory_limit, post_size and file_size there.

    I have one web server process, that is hosting about 10 projects, and every single projects has it's individual PHP config.

  • You should not set memory limit as some (1008) random number like that. You should double the figures up for memory allowed.

    128

    256

    512

    There is also a post here somewhere (I'm not going looking for it) that one of the DEV's posted saying, if you change certain things like max_upload, you should adjust other things also that need to be set higher than it. Otherwise your INI settings configuration won't work proper and may run out of memory still, whatever. I followed his guide before when I adjusted some things with my server, there's about 3 things you need to change and think one of them has to be at least set as double the memory of max-upload. Not sure now exactly without reading that topic again that a DEV posted here.

    Alexander Ebert was the one who posted it I think.

    2 Mal editiert, zuletzt von NicoleSophie (29. September 2018 um 15:25)

  • An unknown error occurred during the upload of a file.

    Read this. Take note of the 3 things he says you change, and that some have to be set bigger than others

    upload_max_filesize - The maximum size per file. (default: 2M)

    post_max_size - Maximum size of data per request, must be larger than upload_max_filesize. (default 8M)

    memory_limit - The maximum amount of memory that PHP may consume, this must be larger than post_max_size. (default 128M)

    So for you I'd guess it should look something like this maybe? I do notice than by default the post_max_size is 4x that of upload_max_filesize set at 2MB (4x = 8MB)

    So you could try this:


    upload_max_filesize = 120MB

    post_max_limit = 512MB (4x the above)

    memory_limit = 768MB (set larger than post_max_limit )

    6 Mal editiert, zuletzt von NicoleSophie (29. September 2018 um 15:46)

  • Thanks for the responses guys!

    NicoleSophie — I already did all those values and used that thread. I posted this before your message:


    One user mentioned something about Cloudflare. I do have the pro version of cloudflare. I’ll look into seeing if the issue is on them.

  • Because you want to set such a large upload limit. It means you need to also change the other values to pretty high limits also. If you are on a shared host type service. Chances are they will not allow you to use such high setting with memory, etc. Some things can even be set by them in the php.ini file that cannot be overridden with cpanel changes on memory settings drop down menu choices. Some things they may have hardcoded the limits that can't be changed at all by you

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!