duanrou5680 2015-09-07 13:21
浏览 89
已采纳

发布最大大小的PHP dropzone问题

I am working on a PHP application deployed on a cent os machine having suhosin installed in it. I used dropzone.js with my application and tried to upload a file size more than 20 MB. I configured the ini setting as follows

post_max_size = 200M
max_input_time=600
max_execution_time=300
max_file_uploads=20
upload_max_filesize = 200M
upload_tmp_dir = /custom_dir/tmp

The tmp is writable, apache has been restarted, display_errors is On, ini_get gives the updated values of php.ini.

Error generated by dropzone is Server responded with 0 code.

I tried creating a demo form and uploaded a file size greater than 20 MB it also failed, less than 20MB uploaded working just fine. I thus came to conclusion the error might be fron server side and not from dropzone.

I have reffered Dropzone.js - maxFilesize increase not working, Large File Upload Errors with PHP, 1GB file upload using php, http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/ Still am unable to figure out why it's not working. Can any one help ? I know this seems to be duplicate question but trust me I have tried all the specs still getting the issue

  • 写回答

1条回答 默认 最新

  • douyi6755 2015-09-08 05:38
    关注

    Got it working suhosin was not the issue It was apache's LimitRequestBody in httpd.conf

    To restricts the total size of the HTTP request body sent from the client use LimitRequestBody Directive. You can add this directive using .htaccess file or httpd.conf file under virtual host or directory configuration options. You can set value (in bytes) from 0 (unlimited) to 2147483647 (2GB) that are allowed in a request body.

    Example for LimitRequestBody set to 100k bytes (in httpd.conf)

    LimitRequestBody 102400

    [...] Save and close the file. You need to restart or reload the httpd server as follows:

    service httpd restart

    or

    service httpd reload

    Source: http://www.cyberciti.biz/faq/apache-limiting-upload-size/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
  • ¥15 不小心不正规的开发公司导致不给我们y码,
  • ¥15 我的代码无法在vc++中运行呀,错误很多
  • ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
  • ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
  • ¥30 ppOCRLabel导出识别结果失败
  • ¥15 Centos7 / PETGEM
  • ¥15 csmar数据进行spss描述性统计分析
  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题