Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » SWFUpload debug array with [error] => 6

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2446 Views
  • bellafaith
    Avatar
    Community Member
    12 Posts

    SWFUpload debug array with [error] => 6 Link to this post

    I'm running into a problem when uploading files. I think it is a server issue, as I have the exact code on a different server where it works fine. However, I can't find anything that would be causing the difference when I compare phpinfo() for both sites. I did SWFUploadConfig::debug(); & the only difference between the two is that I'm getting an array output on the site that isn't uploading.

    Here's the very bottom of debug results for site where upload is working:

    SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Data: 73
    SWF DEBUG: Event: uploadComplete : Upload cycle complete.

    Here's the very bottom of debug results for site where upload is not working:

    SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Data: Array
    SWF DEBUG: (
    SWF DEBUG: [name] => safepersonalcareproducts.png
    SWF DEBUG: [type] =>
    SWF DEBUG: [tmp_name] =>
    SWF DEBUG: [error] => 6
    SWF DEBUG: => 0
    SWF DEBUG: )
    SWF DEBUG: 1
    SWF DEBUG: Event: uploadComplete : Upload cycle complete.

    Anyone know what "[error] =>6" is? Or what may be causing this?

    Thanks!!

  • UncleCheese
    Avatar
    4085 Posts

    Re: SWFUpload debug array with [error] => 6 Link to this post

    http://www.php.net/manual/en/features.file-upload.errors.php

    "UPLOAD_ERR_NO_TMP_DIR
    Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3."

  • bellafaith
    Avatar
    Community Member
    12 Posts

    Re: SWFUpload debug array with [error] => 6 Link to this post

    Thanks UncleCheese. I appreciate your help.

    I was hoping it was something else. When I set the temporary folder in php.ini, now I get a "new-file" issue; where it "appears" the image uploads to assets. However, the file is named "new-file" (regardless of the file's name I'm trying to upload) & then upon hitting "refresh", the "new-file" disappears. And the swfupload debug output is the same for both the server where the upload is working & where it is not working. If I remove the dataobject_manager & swfupload modules, I get an error message that upload_tmp_dir needs to be set in php.ini (but phpinfo() says upload_tmp_dir is set).

    I feel like I'm in a hamster wheel running endless circles. And there's probably a simple solution that I'm just not seeing right now.

  • Olsen
    Avatar
    Community Member
    2 Posts

    Re: SWFUpload debug array with [error] => 6 Link to this post

    I had a problem similar to this. By changing the file encoding of SWFUploadControls.php from UTF-8 to Cp1252 everything suddely worked fine. I have other weird problems with the otherwise brilliant work of UncleCheese. I guess that text encoding might be the source of these problems.

  • bellafaith
    Avatar
    Community Member
    12 Posts

    Re: SWFUpload debug array with [error] => 6 Link to this post

    I eventually figured out that it was indeed the upload_tmp_dir. I took a guess and added "/home" before the client's main directory.

    Here is a list of what I tried in my php.ini [and what the hosting company told me should work] that did not work:
    upload_tmp_dir = "tmp/"
    upload_tmp_dir = "/tmp/"
    upload_tmp_dir = "username/tmp/"
    upload_tmp_dir = "/username/tmp/"

    Here is what did work:
    upload_tmp_dir = "/home/username/tmp/"

    So in my case, it was an issue with the server & the client's hosting company.

    Thank you both for your answers and troubleshooting! I really appreciate it!!

  • bunheng
    Avatar
    Community Member
    77 Posts

    Re: SWFUpload debug array with [error] => 6 Link to this post

    Hi,

    I have the sample problem. While it was on shared hosting it works fine, but when I move to VDS it doesn't work, I have to sit change permission each folder and all sub-folder, is there any solution.

    Thanks

    2446 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.