jQuery Plupload大文件上传失败



im使用plupload和php clas进行调整http://www.verot.net/php_class_upload_docs.htm

一切顺利,但是当我将Big File 4000x2000 PX仅使用250KB上传时,上传失败。为了调整大小的类具有在Limeter上的最大宽度和高度,但设置为空,因此不检查它是否引起上传的取消。

我在Ajax处理程序中的代码是。

$foo = new Upload($_FILES['file']);
    if ($foo->uploaded)
    {
        $new_name = functions::getRandomString(16);
        $foo->file_new_name_body = 'b_' . $new_name;
        if ($foo->image_src_x > 800 or $foo->image_src_y > 600)
        {
        $foo->image_resize = true;
        $foo->image_ratio = true;
        $foo->image_y = 600;
        $foo->image_x = 800;
        }
        $foo->image_convert = 'png';
        $foo->Process($upload_path);
        if ($foo->processed)
        {
        //echo 'image renamed "foo" copied';
        }
        else
        {
        die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Chyba prejmenovani."}, "id" : "id"}');
        }

和jQuery

$("#uploader").pluploadQueue({
    // General settings
    runtimes : 'html5,html4',
    url : '/core/ajax/ajax_upload.php',
    max_file_size : '10mb',
    chunk_size : '5mb',
    unique_names : true,
    /*
    resize : {width : 320, height : 240, quality : 90},
    */
    // Specify what files to browse for
    filters : [
    {
        title : "Image files", 
        extensions : "jpg,jpeg,gif,png"
    }]
    });

和此混凝土文件上传会话的JSON响应

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,

有可能通过PHP配置将限制放在文件大小上,请尝试查看Apache错误日志以查看确切的问题。

您也可以使用<?php phpinfo(); ?>查看最大上载文件

我更改了此虚拟主机的10000000的值,并重新启动了服务器。而且它似乎是固定的。感谢您的帮助踢我检查错误日志。

最新更新