Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SWFUpload error on live site

Go to End

2 Posts   2948 Views

Nathan Cox

Community Member, 99 Posts

23 March 2010 at 11:58am

I'm having some trouble with SWFUpload/FileDataObjectManager on SS 2.3.6. It worked fine on a local windows server but uploaded to the web host and I'm getting the infamous "There was a problem with the upload. The server did not accept it" error, in my pages and in the Files and Images section. I turned on debugging and put die('look at me!') statements in FileDataObjectManager_Controller::handleswfupload() but the never show up, so I guess it doesn't get that far.

Here's the debug output:

---SWFUpload Instance Info---
Version: 2.2.0 Alpha
Movie Name: SWFUpload_0
use_query_string: false
file_post_name: swfupload_file
post_params: [object Object]
file_types: *.jpg;*.JPG;*.png;*.PNG;*.gif;*.GIF;*.jpeg;*.JPEG;
file_size_limit: 8MB
file_upload_limit: 20
file_queue_limit: 20
debug: true
prevent_swf_caching: true
button_placeholder_id: spanButtonPlaceholder
button_width: 180
button_height: 24
button_text: <span class='button'>Upload</span>
button_text_style: .button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; }
button_text_top_padding: 6
button_text_left_padding: 6
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: Build Number: SWFUPLOAD 2.2.0 Alpha 2008-10-17
SWF DEBUG: movieName: SWFUpload_0
SWF DEBUG: File Types String: *.jpg;*.JPG;*.png;*.PNG;*.gif;*.GIF;*.jpeg;*.JPEG;
SWF DEBUG: Parsed File Types: jpg,jpg,png,png,gif,gif,jpeg,jpeg,
SWF DEBUG: File Types Description: (*.jpg;*.JPG;*.png;*.PNG;*.gif;*.GIF;*.jpeg;*.JPEG;)
SWF DEBUG: File Size Limit: 8388608 bytes
SWF DEBUG: File Upload Limit: 20
SWF DEBUG: File Queue Limit: 20
SWF DEBUG: Post Params:
SWF DEBUG: hasDataObject=1
SWF DEBUG: controllerID=17
SWF DEBUG: fileClassName=Image
SWF DEBUG: fileFieldName=Attachment
SWF DEBUG: OverrideUploadFolder=Uploads/Screenshots
SWF DEBUG: parentIDName=ParentID
SWF DEBUG: dataObjectFieldName=Screenshots
SWF DEBUG: dataObjectClassName=Screenshot
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg;*.JPG;*.png;*.PNG;*.gif;*.GIF;*.jpeg;*.JPEG;
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
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: hasDataObject=1
SWF DEBUG: Global Post Item: controllerID=17
SWF DEBUG: Global Post Item: fileClassName=Image
SWF DEBUG: Global Post Item: fileFieldName=Attachment
SWF DEBUG: Global Post Item: OverrideUploadFolder=Uploads/Screenshots
SWF DEBUG: Global Post Item: parentIDName=ParentID
SWF DEBUG: Global Post Item: dataObjectFieldName=Screenshots
SWF DEBUG: Global Post Item: dataObjectClassName=Screenshot
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to 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: 27808. Total: 27808
SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 404.
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
Error Code: -200, File name: grads.jpg, File size: 27808, Message: 404

I'm guessing the problem is "SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 404." but I don't know where it actually is or how to fix it...does anyone have any advice?


Forum Moderator, 4102 Posts

23 March 2010 at 1:17pm

Not sure... you don't have mod_security running or anything? You can use Wireshark to packet sniff the response. It's a big PIA, but you'll find out what's going on, at least.