我正在研究什么是在PHP中设置默认值的最佳值。我见过很多与max_input_time
有矛盾的观点。PHP文件上传是否受到max_input_time的影响?
这个回答说,他相信文件上传不向定时器计数: https://stackoverflow.com/a/3758522/518169
虽然PHP官方文档上,有一个巨大的红色警告说:
max_input_time sets the maximum time, in seconds, the script is allowed to receive input; this includes file uploads. For large or multiple files, or users on slower connections, the default of 60 seconds may be exceeded
来源:http://php.net/manual/en/features.file-upload.common-pitfalls.php,最后更新日期:2012年5月6日,星期五
因此,从这看起来max_input_time
的确影响文件上传,并确保访问者可以上传20 MB的文件,即使是缓慢或移动连接,缺省值60肯定是不够的!
你有什么建议将此值设置为? 300?
此外,max_execution_time
和max_input_time
之间是否有任何关系?例如max_execution_time
需要大于max_input_time
?
我在上传大文件和Apache超时时遇到了一些问题,但是PHP没有。 – 2012-07-08 22:10:44
有趣的是,我在我的一个托管服务提供商中遇到了相同的问题,尽管PHP配置中的所有内容都似乎合法,但较慢的连接上的大型上载导致了“HTTP/1.1 500内部服务器错误”。现在我已经看到第一个答案中的引号,我开始想知道真正的交易是什么。将密切关注这个主题,并尝试自己挖掘一些东西。 – brezanac 2012-07-09 13:50:30