ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Error uploading file w/ File Manager after 2.3.1 upgrade

December 02, 2011 11:36am

Subscribe [3]
  • #1 / Dec 02, 2011 11:36am

    newcastlenow

    16 posts

    Hello,

    I just upgraded to EE v2.3.1 - Build: date 20111017 from 2.2, and am now getting the following error when i use File Manager to try to upload an image:

    A problem was encountered while attempting to move the uploaded file to the final destination.

    I went in to File Manager and reviewed the settings, everything seems unchanged and fine.  I was able to synchronize the image folder with file manager with no errors.  I tried creating a new file upload location, but get the same error.

    I verified that the file upload folder does still exist on the file system.  I can use the file manager to access previously loaded files.

    My site is running on EngineHosting.

    Screenshot of error attached.

    Thanks for any suggestions,
    Greg.

  • #2 / Dec 04, 2011 7:54am

    Sean C. Smith

    3818 posts

    Hi Greg,

    Could you check that your upload directory has permissions set to 777?

    Sean

  • #3 / Dec 04, 2011 1:15pm

    newcastlenow

    16 posts

    Thanks for reply, Sean.

    I set the permissions for the upload directory to 777, tested and got same error.

    Have changed settings back to 754 as I don’t think it is safe to allow public write and execute.

  • #4 / Dec 04, 2011 1:32pm

    newcastlenow

    16 posts

    I don’t know if this proves anything, but i just uploaded a file to my newly created upload directory using FTP and then did a synchronize in EE.  The file then showed up in my EE file manager.  However, i still get the same error message when i try to upload the file using file manager.

    A note regarding permissions: I didn’t change any of the permissions for these folders or move them during the upgrade from 2.2 to 2.3.

  • #5 / Dec 06, 2011 10:44am

    newcastlenow

    16 posts

    Hello,
    I really could use some help with this.  Right now i have the users uploading files with filezilla, then running synchronize, then accessing file via file manager to use the images.  This is taking them much longer than usual, and i’m very nervous about someone breaking EE with an errant drag/drop in filezilla….

  • #6 / Dec 06, 2011 6:58pm

    Sean C. Smith

    3818 posts

    Hi Greg,

    You upload destination needs to be set to 777, this is stated in the documentation here. Could you also check that you have a full path set in your File Upload Preferences.

    Please check this and get back to me.

    Sean

  • #7 / Dec 06, 2011 10:40pm

    newcastlenow

    16 posts

    Hey Sean,

    I set it back to 777 and retested.  Still nothing.  Left it at 777.  Screenshot is attached showing settings.

    Also verified that there is a full path to directory under the upload preferences.

  • #8 / Dec 08, 2011 2:12pm

    Kevin Smith

    4784 posts

    Hi Greg,

    I don’t believe this error has to do with your permissions, at least not directly. You could still be getting this error even if your permissions are correct. Here’s the bit of code where your upload is failing:

    /*
       * Move the file to the final destination
       * To deal with different server configurations
       * we'll attempt to use copy() first.  If that fails
       * we'll use move_uploaded_file().  One of the two should
       * reliably work in most environments
       */
      if ( ! @copy($this->file_temp, $this->upload_path.$this->file_name))
      {
       if ( ! @move_uploaded_file($this->file_temp, $this->upload_path.$this->file_name))
       {
        $this->set_error('upload_destination_error');
        return FALSE;
       }
      }

    My recommendation first is to talk with EngineHosting to make sure that there’s not something preventing EE from using the PHP functions “move” or “move_uploaded_file”. They shouldn’t be, but there might be something misconfigured on your server that disallows use of those functions.

    Other than that, the only thing that should cause those functions to fail would be if the filepaths are set incorrectly. If that’s not the case, let us know and we’ll take it from there.

  • #9 / Dec 09, 2011 3:08pm

    newcastlenow

    16 posts

    Thanks Kevin.  I have opened a ticket w/ EngineHosting and will let you know what they say.

  • #10 / Dec 09, 2011 3:40pm

    newcastlenow

    16 posts

    EngineHosting found the problem:
    There needs to a “sessiondata” and “uploadtemp” folder above public_html.

    I was missing uploadtemp.  Created it with 755 permissions and now file upload upload works again.

    I must have inadvertently deleted the folder when i was doing the move to EE 2.3

    Thanks for your help.

  • #11 / Dec 11, 2011 8:55am

    Sean C. Smith

    3818 posts

    newcastlenow,

    It’s good to see this resolved. Don’t hesitate to post again when you need more help.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases