dqc18251 2012-12-12 15:47
浏览 57
已采纳

上传只上传小文件

I have uploadify running on Plesk/apache set to FastCGI uploading to an uploads file melow the document root. This seems to work with files less than 1MB but creates an ERROR 500 on anything larger.

$(function() {


var idx=$('.useri').val();
$('#file_upload2').uploadify({
    'multi'    : false,
    'swf'      : 'images/uploadify.swf',
    'uploader' : 'admin_includes/uploadify.php',
    'formData'  : {'user_id': idx},
    'fileSizeLimit' : '10MB',
    // Put your options here
    // Some options
    'onUploadSuccess' : function(file, data, response) {
        if(data==2)
        {
            alert("File Extension needs to be either .docx, .doc or .pdf");
        }
        else
        {
            var data_split=data.split("|");
            $('.title_holder').fadeIn(200);
            $('.upload_hider').show();
            $('.added_file').html("");
            $('.message12').html('<p class="added_file" data-file2='+data_split[1]+'>'+data_split[0]+' Successfully Uploaded.</p>');

        }
    }
});
});

I have also set php.ini as follows

safe_mode = Off
upload_tmp_dir /tmp
upload_max_filesize = 40M
post_max_size = 40M

This does not seem to work either. Is there anything that I am missing or seem to have done wrong ?

  • 写回答

3条回答 默认 最新

  • dtu15253 2013-01-06 10:00
    关注

    Thanks for the help but I seem to have solved the problem. What I have failed to say in this thread is that my server has Plesk 10.3.1 installed. It appears that this version of Plesk overwrites the maxRequestLen in the server configuration to something like 128Kb.

    The solution was to reset this to 1GB (normal default size) or required size in either /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php or /etc/httpd/conf.d/fcgid.conf and restart the server.

    Future versions of Plesk do not have this problem as far as I am aware.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站