当大量数据 POST 到大约超过 1 MB 的 php 文件时出现 500 内部服务器错误
谁能解释一下为什么当大量数据 POST 到 php 文件并且数据超过 1 mb 时会出现 500 内部服务器错误?
Can anyone explain me why 500 Internal Server Error coming when large amount of data is POST to a php file and the data is around more than 1 mb?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最好的猜测是该文件超出了您配置的最大文件大小。请参阅http://php.net/manual/en/features.file-upload。 php 用于抛出更漂亮的错误消息的各种讨论和解决方案。
至于增加这些限制,请查看 .ini 文件中的“post_max_size”和“upload_max_size”。您可能还需要通过“max_input_time”和“max_execution_time”来延长脚本的执行时间。
您可以在 .ini 或代码中设置它们。请参阅http://blogs.sitepoint.com/upload-large-files-in -php/ 了解更多信息。
My best guess is that the file is exceeding your configured maximum file size. See http://php.net/manual/en/features.file-upload.php for various discussion and solutions for throwing a prettier error message.
As to increasing those limits, look at "post_max_size" and "upload_max_size" in your .ini file. You'll also likely need to extend the execution time of the script, via "max_input_time" and "max_execution_time".
You can set these in your .ini, or in code as well. See http://blogs.sitepoint.com/upload-large-files-in-php/ for more info.