I used swfupload extension before and it works fine until i used it on my new project and i got a weird error.
My new project was at the same hosting and with same configuration with my previous project that was working.
$_POST and $_FILES variables are empty and definitely when post variable was empty it will return a csrf validation error. Charles web debugging proxy reported that it was submitting data but when it reaches the server it was empty.
Below is my debug info.
---SWFUpload Instance Info---
Version: 2.2.0 2009-03-25
Movie Name: SWFUpload_0
Settings:
upload_url: /igbl/debugger.php
flash_url: /igbl/assets/3c073be/swfupload.swf?preventswfcaching=1326707461787
use_query_string: false
requeue_on_error: false
http_success:
assume_success_timeout: 0
file_post_name: Filedata
post_params: [object Object]
file_types: *.jpg; *.jpeg; *.gif; *.png; *.pdf; *.doc; *.ppt; *.txt; *.xls
file_types_description: Web Files
file_size_limit: 102400
file_upload_limit: 20
file_queue_limit: 0
debug: true
prevent_swf_caching: true
button_placeholder_id: spanButtonPlaceholder
button_placeholder: Not Set
button_image_url: /igbl/images/XPButtonUploadText_61x22.png
button_width: 61
button_height: 22
button_text:
button_text_style: color: #000000; font-size: 16pt;
button_text_top_padding: 0
button_text_left_padding: 0
button_action: -110
button_disabled: false
custom_settings: [object Object]
Event Handlers:
swfupload_loaded_handler assigned: true
file_dialog_start_handler assigned: true
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: Version: 2.5.0 2010-03-05 Beta 3.2
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: Upload URL: /igbl/debugger.php
SWF DEBUG: File Types String: *.jpg; *.jpeg; *.gif; *.png; *.pdf; *.doc; *.ppt; *.txt; *.xls
SWF DEBUG: Parsed File Types: jpg,jpeg,gif,png,pdf,doc,ppt,txt,xls
SWF DEBUG: HTTP Success: 0
SWF DEBUG: File Types Description: Web Files (*.jpg; *.jpeg; *.gif; *.png; *.pdf; *.doc; *.ppt; *.txt; *.xls)
SWF DEBUG: File Size Limit: 104857600 bytes
SWF DEBUG: File Upload Limit: 20
SWF DEBUG: File Queue Limit: 20
SWF DEBUG: Post Params:
SWF DEBUG: YII_CSRF_TOKEN=2053931939f1ba96105df7d705ab17b87ebfc36e
SWF DEBUG: PHPSESSID=1fe5bc5cce9d1f95daa20fd5f589f88b
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
debugger.php is just a plain php script that var_dump $_POST variable to isolate yiiframework from the problem.