1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Can't Upload Attachments (Error Attached)

Discussion in 'Troubleshooting and Problems' started by faeronsayn, Mar 24, 2013.

  1. faeronsayn

    faeronsayn Well-Known Member

    I keep on getting a There was a problem uploading your file. error so I checked the java console for more information and it had a few things listed there that I've coped and pasted below.

    Could anyone please help troubleshoot this error?

    XenForo editor ctrl_message,
    [textarea#ctrl_message_html.textCtrl MessageEditor, context: document, selector: "#ctrl_message_html", constructor: function, init: function, selector: ""…]
    ) xenforo.js:191
    XenForo.init() 115ms. jQuery 1.5.2/1.2.6-dev xenforo.js:188
    Set cookie sidebar=false xenforo.js:176
    set prefix 55 title_prefix.js:8
    SWFUpload successfully initialized (SWFUpload_0) attachment_editor.js:7
    OverlayLoader for http://shadywarez.com/attachments/upload?hash=1c6e12a89e0ea8aafc969d5dce8de092&content_type=post&content_data[node_id]=50 xenforo.js:243
    [div.xenOverlay __XenForoActivator attachmentUploader, constructor: function, init: function, selector: "", jquery: "1.5.2", size: function…]
    ) xenforo.js:191
    Inline file upload completed successfully. Data:
    [div.xenOverlay __XenForoActivator, constructor: function, init: function, selector: "", jquery: "1.5.2", size: function…]
    ) xenforo.js:191
    Queued file LICENSE.txt (1558 bytes). attachment_editor.js:13
    [li#SWFUpload_0_0.AttachedFile secondaryContent __XenForoActivator, prevObject: d.fn.d.init[1], context: document, selector: ".appendTo(.AttachmentList.New)", constructor: function, init: function…]
    ) xenforo.js:191
    Attachments changed, total files: 1, images:  attachment_editor.js:13
    Uploading LICENSE.txt attachment_editor.js:10
    Uploaded /1558 bytes. attachment_editor.js:14
    Uploaded 2582/1558 bytes. attachment_editor.js:14
    POST http://shadywarez.com/attachments/do-upload.json?hash=1c6e12a89e0ea8aafc969d5dce8de092&content_type=post 500 (Internal Server Error) swfupload.min.js:1
    Upload failed:
    [Object, -200, "500"]
    [div.xenOverlay __XenForoActivator, constructor: function, init: function, selector: "", jquery: "1.5.2", size: function…]
    ) xenforo.js:191
    All files uploaded.
  2. faeronsayn

    faeronsayn Well-Known Member

    When I turn flash uploader off, this is the error I get.

    move_uploaded_file(/home2/shadywar/public_html/internal_data/attachments/4/4027-911d374696c0a5e9e6e848e7f20d0ee1.data) [function.move-uploaded-file]: failed to open stream: Permission denied
    move_uploaded_file() in XenForo/DataWriter/AttachmentData.php at line 203
    XenForo_DataWriter_AttachmentData->_moveFile() in XenForo/DataWriter/AttachmentData.php at line 183
    XenForo_DataWriter_AttachmentData->_writeAttachmentFile() in XenForo/DataWriter/AttachmentData.php at line 117
    XenForo_DataWriter_AttachmentData->_postSave() in XenForo/DataWriter.php at line 1385
    XenForo_DataWriter->save() in XenForo/Model/Attachment.php at line 488
    XenForo_Model_Attachment->insertUploadedAttachmentData() in XenForo/ControllerPublic/Attachment.php at line 195
    XenForo_ControllerPublic_Attachment->actionDoUpload() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home2/shadywar/public_html/index.php at line 13
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Permission error.

    If you have shell access then try running these commands to recursively set permissions in those directories:

    chmod -R 777 data
    chmod -R 777 internal_data
    You might also try 755 permissions. Depending on how PHP is installed, 755 may still be writable. I have seen some server configurations throw errors with 777.
  4. faeronsayn

    faeronsayn Well-Known Member

    I've ran them, and the problem seems to be solved. Do these permissions also change the owner or something? Because in cPanel I had changed it to 777, but it didn't make a difference.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It doesn't change the owner, but it does set permissions in all subdirectories.

Share This Page