doulou0882 2013-10-02 15:09
浏览 175
已采纳

无论php.ini设置如何,PHP post max size都限制在20M

I have a debian squeeze server with Plesk Panel 11, apache and PHP 5.3.3 I want to increase maximum upload file size but when I try to upload more than 20M, in a single or multiple files, I receive the error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

This is my settings:

  1. memory_limit = 128M
  2. max_execution_time = 3600
  3. max_input_time = 3600
  4. upload_max_filesize = 100M
  5. post_max_size = 100M

and also

  1. suhosin.memory_limit=0
  2. suhosin.post.max_value_length=1000000

My apache error log does not contain any relevant reference to the error.

What could cause this 20M cap ?


I tryed a simple page with just a form with one file of 21M in test.php and test.html The pure html form is submitted successfully. The same HTML code in test.php is not. Hence it must be some problem with PHP and not apache or the server. I disabled all php extension and removed .htaccess without success. I also tryed to post data locally from the server command line with curl but I got the same error.

Could be a bug of my PHP version ? Upgrading means to go from squeeze to wheezy, and since it's a production server I can't do this so easily

  • 写回答

2条回答 默认 最新

  • doupi3874 2013-10-14 03:23
    关注

    Finally after many hours of trial and errors I found the solution! It was the line

    MaxRe­ques­tLen 
    

    in the file

    /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php
    

    which is in effect only if PHP is loaded via fastCGI!!!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部