upload large files using php, apache

后端 未结 5 730
再見小時候
再見小時候 2020-11-27 07:25

I want to upload files of around 150 MB using PHP and Apache server. With my code i can upload upto 5MB



        
5条回答
  •  借酒劲吻你
    2020-11-27 08:02

    I'd also check the max input time and script execution time. They're both currently set to 300 seconds (5 minutes). That would mean the user has to upload 150 mb (1200 mega-bits) in 300 seconds. That means the end user would need a solid and consistent 4mbps connection (1200 / 300 = 4) to upload that file in the allotted time.

    I would recommend something similar to these settings:

    file_uploads = On
    upload_tmp_dir = "/your/tmp/dir"
    upload_max_filesize = 150M ; You may want to bump this to 151M if you have problems with 150 mb files
    max_execution_time = 1200 ; 20 minutes, which is a 150 mb file at 1mbps
    max_input_time = 1200
    

提交回复
热议问题