Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
547 views
in Technique[技术] by (71.8m points)

configuration - Request Entity Too Large

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 provided in the request exceeds the capacity limit. 

I set

php_value post_max_size 50M
php_value upload_max_filesize 50M

in .htaccess but not helped

How to overcome this?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After you are over the raising of PHP's memory_limit, post_max_size and upload_max_filesize, I would like to recommend you some articles related to the topic, maybe one of them solves the problem.

I found this post on Server Fault:
https://serverfault.com/questions/79741/php-apache-post-limit/79745#79745

  • sybreon suggests to double-check the Content-Length, and - citing - "ensure that you are directly connecting to Apache and not through either a proxy or a reverse-proxy. Some reverse-proxies place a cap on the maximum size of a request as a sort of security measure. So, you may want to check that as well as your Apache logs to ensure that nothing else is going on."

  • sybreon also posted this link: Apache 413 error problems.
    The following is only applicable if you have mod_ssl module turned on in Apache. (Otherwise this setting can cause a server crash.)
    Citing the article:
    "I was using Apache SSL client certificates, which have a limit of 128K, and if re-negotiation has to happen, a larger POST will fail.
    This Bugzilla posting had the clues - You have to set the following as DEFAULTS for your SSL server, not just the directory.

    SSLVerifyClient require
    

    Otherwise it forces a renegotiation of some sort, and fails with a 413 error."

  • The previous article also mentioned the LimitRequestBody directive.
    A guy says here that the appropriate setting of this directive solved his problem..

I hope one of these settings solves this problem!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...