POST Content-Length exceeds the limit

后端 未结 9 2254
盖世英雄少女心
盖世英雄少女心 2020-11-27 11:26

I get similar errors in my error_log in php when users are uploading their files

PHP Warning: POST Content-Length of 11933650 bytes exceeds the limi

相关标签:
9条回答
  • 2020-11-27 11:51

    If you are using Php 5.6.X versions in windows using Wamp, then file location may be in,

    C:\Windows\php.ini

    Just try with

    post_max_size = 100M;
    

    Try to do changes in Apache one. By that your Wamp/XAMP load .ini file

    0 讨论(0)
  • 2020-11-27 11:52

    Try pasting this to .htaccess and it should work.

    php_value post_max_size 2000M
    php_value upload_max_filesize 2500M
    php_value max_execution_time 6000000
    php_value max_input_time 6000000
    php_value memory_limit 2500M
    
    0 讨论(0)
  • 2020-11-27 11:54

    In Some cases, you need to increase the maximum execution time.

    max_execution_time=30
    

    I made it

    max_execution_time=600000
    

    then I was happy.

    0 讨论(0)
  • 2020-11-27 12:06

    you just setting at php.ini

    then set :

    upload_max_filesize = 1000M;
    post_max_size = 1000M;
    

    then restart your xampp.. Check the image

    0 讨论(0)
  • 2020-11-27 12:07

    I suggest that you should change to post_max_size from 8M to 32M in the php.ini file.

    0 讨论(0)
  • 2020-11-27 12:13

    post_max_size should be slightly bigger than upload_max_filesize, because when uploading using HTTP POST method the text also includes headers with file size and name, etc.

    If you want to successfully uppload 1GiB files, you have to set:

    upload_max_filesize = 1024M
    post_max_size = 1025M
    

    Note, the correct suffix for GB is G, i.e. upload_max_filesize = 1G.

    No need to set memory_limit.

    0 讨论(0)
提交回复
热议问题