简体   繁体   English

Fine-uploader和PHP Server-大文件问题(> 900MB)

[英]Fine-uploader and PHP Server - Problems with big files (>900MB)

I set up fine-uploader and created a PHP Server handler which is instancing the qqfileuploader.php. 我设置了Fine-uploader并创建了一个实例化qqfileuploader.php的PHP Server处理程序。 Everything works perfectly fine, until I try to upload large files. 一切正常,直到我尝试上传大文件。 Up to 600-700 MB it works great, now I tried a file of 909 MB: 最高可达600-700 MB,效果很好,现在我尝试了909 MB的文件:

log: 日志:

FineUploader 3.8.2] Sending upload request for 3 

It is uploading, but when the progressbar reaches 100%, it starts again at 0%. 它正在上载,但是当进度栏达到100%时,它将再次从0%开始。 Then it shows "proccessing.." and again a progressbar. 然后,它显示“处理中..”,并再次显示进度条。 Then after a while: 然后过一会儿:

Log: 日志:

[FineUploader 3.8.2] xhr - server response received for 3 
[FineUploader 3.8.2] responseText =  
[FineUploader 3.8.2] Received response status 0 with body:  
[FineUploader 3.8.2] Error when attempting to parse xhr response text (Unexpected end of input) 

On my local machine it's working even with the same file. 在我的本地计算机上,即使使用相同的文件,它也可以正常工作。 The problem appears only when done on my webhosting. 仅在我的虚拟主机上完成后,问题才会出现。 post_max size and upload file size is set properly. post_max大小和上载文件大小已正确设置。 What else can I do? 我还可以做些什么?

This is my serverside upload handling method: 这是我的服务器端上传处理方法:

public function doUpload()
    {   
        $uploader = new qqFileUploader('uploads');
        $uploader->allowedExtensions = array();
        $uploader->sizeLimit = 1200 * 1024 * 1024; // 1.2GB

        $uploader->inputName = 'qqfile';

        $uploader->prefix = $_SESSION['identifier']; //file prefix

        $uploader->chunksFolder = 'chunks';

        $result = $uploader->handleUpload('uploads');

        $result['uploadName'] = $uploader->getUploadName();

        header("Content-Type: text/plain");
        echo json_encode($result);
    }

You need a proper value for the following php.ini settings: 您需要为以下php.ini设置提供适当的值:

  1. max_input_time (not max_execution_time!) max_input_time (不是max_execution_time!)
  2. upload_max_filesize upload_max_filesize
  3. post_max_size post_max_size

And maybe 有可能

memory_limit memory_limit

Source: Can file uploads time out in PHP? 来源: 文件上传可以在PHP中超时吗? from @Ionuț G. Stan 来自@ Ionuț G. Stan

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM