2012-07-20 50 views
0

我在我的服務器上使用uploadify在亞馬遜EC2上託管,我有端口80和22打開,Uploadify使用哪個端口,所以我可以修復它?uploadify什麼端口?在亞馬遜ec2問題

的問題是,uploadify讓客戶相信,圖像上傳,但我不會在我的服務器到達,我認爲這是港口,因爲它的工作我的舊服務器上HostGator的

我的代碼上表單是:

// <![CDATA[ 



$(document).ready(function() { 

$("#dialog").dialog({ 

     bgiframe: true, 

     height: 250, 

     width:400, 

     autoOpen: false, 

     modal: false, 

     buttons: { 

      'cancel order': function() { 

       $(this).dialog('close'); 

       $('#file_upload').uploadifyClearQueue(); 

       $('#file_upload').uploadifyCancel(($('.uploadifyQueueItem').first().attr('id').replace('file_upload',''))); 



      }, 

      'confirm order': function() { 

       $('#file_upload').uploadifyUpload(); 

       $(this).dialog('close'); 

      } 

     } 

}); 



$('#file_upload').uploadify({ 

'uploader' : 'swf/uploadify.swf', 

'script' : 'swf/uploadify.php?userid=<?php echo $_SESSION['userid']; ?>', 

'cancelImg' : 'image/cancel.png', 

'folder' : 'uploads', 

'buttonImg' : 'image/uploadbtn.png', 

'height' : 120, 

'width'  : 400, 

'sizeLimit' : 299240000, 

'auto'  : false, 

'queueSizeLimit' : 3, 

'scriptData': {'session_name': '<?php echo session_id(); ?>'}, 

'checkScript' : 'ajaxfiles/check.php', 

'onSelect' : function(event,ID,fileObj) { 

    $('#dialog').dialog('open'); 

    var price=$('#templateprice').val(); 

    var txt="You are now uploading 1 image at a price of $ "+price+" pr. image "; 

    $('#test_para').text(txt); 

}, 

'onError'  : function (event,ID,fileObj,errorObj) { 

    alert(errorObj.type + ' Error: ' + errorObj.info); 

}, 

'onProgress' : function(event,ID,fileObj,data) { 

    var bytes = Math.round(data.bytesLoaded/1024); 

    $('#' + $(event.target).attr('id') + ID).find('.percentage').text(' - ' + bytes + 'KB Uploaded'); 

    return false; 

}, 

'onAllComplete' : function(){ alert("Thank you. File uploaded successfully."); } 

}); 

}); 



// ]]> 

回答

0

Uploadify使用http或https將文件上傳到PHP腳本。

如果您同時打開端口80和端口22,則問題必須出現在別處。

我建議你檢查服務器

確保您的上傳文件夾的權限是正確的文件權限。如果你不確定或者什麼權限設置它們,使用755

http://www.uploadify.com/documentation/uploadify/making-uploadify-secure/

+0

我允許:21 \t 0.0.0.0/0 \t刪除 22(SSH)\t 0.0.0.0/0 \t刪除 25(SMTP)\t \t 0.0.0.0/0刪除 80(HTTP)\t \t 0.0.0.0/0刪除 443(HTTPS)\t \t 0.0.0.0/0刪除 3389(RDP)\t 0.0.0.0/ 0 – 2012-07-20 18:18:47

+0

您是否檢查了上傳文件夾的權限?你的端口看起來很好。 – 2012-07-21 16:46:58