Increasing the maximum post size

后端 未结 9 1979
旧巷少年郎
旧巷少年郎 2020-11-22 04:39

There is a lot of data being submitted no file uploads and the $_SERVER[\'CONTENT_LENGTH\'] is being exceeded. Can this be increased?

相关标签:
9条回答
  • 2020-11-22 05:36

    You can increase that in php.ini

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 2M
    
    0 讨论(0)
  • 2020-11-22 05:37

    There are 2 different places you can set it:

    php.ini

    post_max_size=20M
    upload_max_filesize=20M
    

    .htaccess / httpd.conf / virtualhost include

    php_value post_max_size 20M
    php_value upload_max_filesize 20M
    

    Which one to use depends on what you have access to.

    .htaccess will not require a server restart, but php.ini and the other apache conf files will.

    0 讨论(0)
  • 2020-11-22 05:43

    I had a situation when variables went missing from POST and all of the above answers didn't help. It turned out that

    max_input_vars=1000
    

    was set by default and POST in question had more than that. This may be a problem.

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