Request Entity Too Large

后端 未结 5 1766
天涯浪人
天涯浪人 2020-12-06 00:38

I get this message,

Request Entity Too Large
The requested resource
/index.php
does not allow request data with POST requests, or the amount of data provide         


        
5条回答
  •  情话喂你
    2020-12-06 01:36

    If max_post_upload and max_file_upload in PHP has been set, and there is a setting in Apache2.conf or ModSec config files of LimitRequestBody set high enough

    then possibly a .htaccess file will work.

    1. Go to the directory with the upload php file in it ( the file or page throwing the error.)

    2 . Make or edit .htaccess

    3 . Edit or create a line with LimitRequestBody 20971520 in it.

    1. Save the .htaccess. Set permissions. ( 644 and apache owner)

    2. Possibly restart apache.

    Tada . Hopefully fixed.

    This setting sets that limit for this folder only - which is one way to avoid a global setting in php and apache which makes you open to large packet / load DOS attacks.

    LimitRequestBody 0 gives you unlimited uploads.

提交回复
热议问题