doulou0882 2013-10-02 23: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:

memory_limit = 128M
max_execution_time = 3600
max_input_time = 3600
upload_max_filesize = 100M
post_max_size = 100M

and also

suhosin.memory_limit=0
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 11: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条)

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置