SWFUpload没有显示错误,但不上传大型视频文件

时间:2013-03-18 18:05:36

标签: php file-upload swfupload

我有一个继承的项目,它使用代码igniter,prototype.js和swfUpload来管理大型视频文件。我遇到了一个上传大型视频文件的问题。

我已成功上传较小的文件(约198mb mpg文件和3mb mov文件),但在上传1.57 GB mov文件时遇到调试问题。

在我的本地计算机上,上传在约1分钟内完成上传,成功返回。但是当我转到文件应该存在的uploads文件夹(以及成功上传较小文件的位置)时,它就丢失了。

我的错误日志中没有错误。

在我的.htaccess文件中,我正在设置:

php_value upload_max_filesize 6143M  
php_value post_max_size 6143M  

我通过调用ini_get()

确认这是有效的

这是我的SWFUpload对象:

swfu = new SWFUpload({
   debug: true,
   upload_url: '" . BASE_URL . "/content_management/ajax_asset_upload_files',
   flash_url: '" . BASE_URL . "/js/swfupload/Flash/swfupload.swf',

   post_params: {'PHPSESSID' : '" . $this->session->userdata('session_id') . "'},
   file_size_limit : '10000 MB',
   file_types : '*.*',
   file_types_description : 'All Files',
   file_upload_limit : 100,
   file_queue_limit : 0,
   custom_settings : {
      progressTarget : 'fsUploadProgress'
   },

   // Button settings
   button_image_url: '" . BASE_URL . "/images/buttons/btn_select_file.gif',
   button_width: '105',
   button_window_mode: 'transparent',
   button_height: '20',
   button_placeholder_id: 'spanButtonPlaceHolder',
   button_disabled: true,
   button_cursor: SWFUpload.CURSOR.HAND,
   button_action: SWFUpload.BUTTON_ACTION.SELECT_FILE,

   // The event handler functions are defined in handlers.js
   file_queued_handler : fileQueued,
   file_queue_error_handler : fileQueueError,
   file_dialog_complete_handler : fileDialogComplete,
   upload_start_handler : uploadStart,
   upload_progress_handler : uploadProgress,
   upload_error_handler : uploadError,
   upload_success_handler : assetUploadSuccess,
   upload_complete_handler : uploadComplete,
   queue_complete_handler : queueComplete // Queue plugin event
});

调试输出:

---SWFUpload Instance Info---
Version: 2.2.0 2009-03-25
Movie Name: SWFUpload_0
Settings:
   upload_url:               [function location]
   flash_url:                [js_folder]/swfupload.swf?preventswfcaching=1363621116581
   use_query_string:         false
   requeue_on_error:         false
   http_success:             
   assume_success_timeout:   0
   file_post_name:           Filedata
   post_params:              [object Object]
   file_types:               *.*
   file_types_description:   All Files
   file_size_limit:          10000 MB
   file_upload_limit:        100
   file_queue_limit:         0
   debug:                    true
   prevent_swf_caching:      true
   button_placeholder_id:    spanButtonPlaceHolder
   ...
Event Handlers:
   swfupload_loaded_handler assigned:  false
   file_dialog_start_handler assigned: false
   file_queued_handler assigned:       true
   file_queue_error_handler assigned:  true
   upload_start_handler assigned:      true
   upload_progress_handler assigned:   true
   upload_error_handler assigned:      true
   upload_success_handler assigned:    true
   upload_complete_handler assigned:   true
   debug_handler assigned:             true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG: 
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0
SWF DEBUG: movieName:              SWFUpload_0
SWF DEBUG: Upload URL:             [function location]
SWF DEBUG: File Types String:      *.*
SWF DEBUG: Parsed File Types:      
SWF DEBUG: HTTP Success:           0
SWF DEBUG: File Types Description: All Files (*.*)
SWF DEBUG: File Size Limit:        10485760000 bytes
SWF DEBUG: File Upload Limit:      100
SWF DEBUG: File Queue Limit:       100
SWF DEBUG: Post Params:
SWF DEBUG:                         PHPSESSID=ki7kne5j6co95il6f6hqt8pje4
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Single Select. Allowed file types: *.*
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
EXCEPTION: 
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: PHPSESSID=ki7kne5j6co95il6f6hqt8pje4
SWF DEBUG: File Post Item: asset_id=131
SWF DEBUG: File Post Item: document_type_id=4
SWF DEBUG: File Post Item: title_id=-1
SWF DEBUG: File Post Item: title=test3
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to [upload function] for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1409024. Total: 1692228612
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 5308416. Total: 1692228612
...
...
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1692228612. Total: 1692228612
SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true Data: 
SWF DEBUG: Event: uploadComplete : Upload cycle complete.

提前致谢。

1 个答案:

答案 0 :(得分:0)

您的主机可能已禁用ini_set php变量(如set_time_limit(0))以增加最大执行时间,在这种情况下,它将在httpd.conf中使用Apache的“Timeout”,默认为60秒。还要设置FcgidMaxRequestLen,这是最大请求长度,以字节为单位。

在php中,还要检查:memory_limit

为了帮助您调试,还可以尝试: 函数ini_set( '的display_errors', '上'); 的error_reporting(E_ALL);

也删除代码中的所有符号。示例:@ $ varname或@functionName() @告诉PHP隐藏正在发生的任何错误。

可能是你的error_reporting级别设置得太低,所以确实存在错误,但是你没有看到它。以上应该解决这个问题。