• Resolved kmligue

    (@kmligue)


    I have a file that is 125mb size. I managed to increase the upload max size via php.ini to 256mb. The problem is when i upload the file it will still display the 413 error.

    screenshot: https://imgur.com/4OiXwlc

    Has this something to do with cloudflare? I already disable cloudflare page caching.

    I need some help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator James Huff

    (@macmanx)

    If you increased upload_max_filesize in php.ini, you also need to increase post_max_size for example:

    upload_max_filesize = 256M ;
    post_max_size = 256M ;
    Thread Starter kmligue

    (@kmligue)

    yes. I actually put post_max_size also. Still the same problem.

    Moderator James Huff

    (@macmanx)

    In that case then, I recommend contacting your hosting provider. PHP has been directed to accept a file of that size, but something in your server configuration is still rejecting it as too large.

    Thread Starter kmligue

    (@kmligue)

    I fix the problem. It was a cloudflare issue. They have an upload limit of 100mb. I just turn off cloudflare on my site instead of just disabling the page cache.

    Moderator James Huff

    (@macmanx)

    Thanks for sharing your solution!

    Nginx configuration:
    # vi /etc/nginx/nginx.conf
    OR
    # vi /usr/local/nginx/conf/nginx.conf
    Add the following line to http or server or location context to increase the size limit in nginx.conf, enter:

    # set client body size to 256M #
    client_max_body_size 256M;

    Save and close the file. Reload the nginx webserver, enter:
    # /usr/local/nginx/sbin/nginx -s reload
    OR
    # /sbin/nginx -s reload
    OR use the following on RHEL/CentOS/Debian/Ubuntu Linux:
    # service nginx reload

    PHP configuration (optional):

    Edit php.ini and set the following directives
    ;This sets the maximum amount of memory in bytes that a script is allowed to allocate
    memory_limit = 256M

    ;The maximum size of an uploaded file.
    upload_max_filesize = 256M

    Save and close the file. Make sure you reload/restart back-end apache or nginx web server as per your setup.

    • This reply was modified 8 years, 4 months ago by Nanhe Kumar. Reason: formating

    You can check the methods and the solutions at here: How to fix and solve Error 413 code problem

    edwinmalehase

    (@edwinmalehase)

    I have a file size 16MB, but when i upload keep getting “413 Request Entity Too Large”?

    did you find a solution?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘413 Request Entity Too Large’ is closed to new replies.