"Unable to move/copy file" on attachment upload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kjh411
    Senior Member
    • May 2007
    • 194
    • 3.7.x

    "Unable to move/copy file" on attachment upload

    I'm getting the message "Unable to move/copy file" when trying to upload an attachment with a post.

    Now this may have be a consequence of moving the forums recently. I wondered if the folder for attachments was not writable by the web server, but I can't find anything in the vB documenation that says what the attachments folder is.

    Can someone please give me some pointers - specifically, (a) what is the normal folder name and location where attachments are stored, and (b) what folder permissions need to be set to 0777 for vBulletin to work properly (I suspect this information is shown only when installing vB and having moved my forums I may need to reset some permissions).

    Thanks,
    Kevin
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    If you moved servers then you also needed to move the attachments directory to a new directory on that server.

    How Do I Change the Location of Attachments After a Server Move
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • kjh411
      Senior Member
      • May 2007
      • 194
      • 3.7.x

      #3
      Thanks Steve. I should have been clearer. I didn't move servers, I moved the forums on the same server.

      I worked out the problem. We're running in php safe mode and I hadn't re-specified the Safe Mode Temporary Directory and set it permissions correctly.

      (I also just remembered why I couldn't see the attachments folder - because I had moved it below the root! , although that wasn't the cause of the problem)

      Now I just need to work out why thumbnails aren't showing

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Attachments (and thumbnails) in the file system will not work with Safe Mode enabled. You will have to either disable safe mode, or move them back to the database.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • kjh411
          Senior Member
          • May 2007
          • 194
          • 3.7.x

          #5
          Originally posted by Steve Machol
          Attachments (and thumbnails) in the file system will not work with Safe Mode enabled. You will have to either disable safe mode, or move them back to the database.
          It turns out that safe mode is not enabled on our server, which probably explains why attachments are working, just not thumbnails (they were working before we move the forums).

          I have changed the safe mode setting to "No" in Server Settings and Optimization Options but that hasn't helped. Have also updated the counter for attachment thumbnails.

          Comment

          • kjh411
            Senior Member
            • May 2007
            • 194
            • 3.7.x

            #6
            Now getting a new error on uploading an attachment;

            Thumbnail creation failed due to inability to obtain image size.

            Comment

            • Steve Machol
              Former Customer Support Manager
              • Jul 2000
              • 154488

              #7
              Back to basics.

              To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

              Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions


              [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

              Next, disable all plugins.

              Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

              define('DISABLE_HOOKS', true);

              Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment

              • kjh411
                Senior Member
                • May 2007
                • 194
                • 3.7.x

                #8
                Before we take such drastic measures, would it help to know that the thumnail creation works with GD ? (it does)

                I've already checked that were using ImageMagick 6.x

                Comment

                • kjh411
                  Senior Member
                  • May 2007
                  • 194
                  • 3.7.x

                  #9
                  okay Steve, situation update

                  rather than jump through all the hoops described above, we decided to do a fresh install of vB 3.7 on a different domain on the same server (just for testing purposes), so it is completely separated from the forum where we are having the thumbnail problems.

                  First thing we did was try an attachment upload (after enabling ImageMagick) and the thumbnail creation failed with the error;

                  Thumbnail creation failed due to inability to obtain image size.

                  This suggests we have a problem with the server/IM. Can you give me any pointers?

                  What exactly triggers this error message?

                  Thanks,
                  Kevin

                  EDIT: PS. can you tell me how vB uses IM ? (which utilities does it use? is there a php file which manages the process?)

                  EDIT2: Okay, I see that vB requires only the IM convert and identify binaries, which are present in the corrent place. In which case we really need to know how vB uses them please.
                  Last edited by kjh411; Tue 3 Jun '08, 3:51am.

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    What's the URL to your forums?
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • kjh411
                      Senior Member
                      • May 2007
                      • 194
                      • 3.7.x

                      #11
                      It probably best to look at the test forum, because it is a fresh vBulletin 3.7 install (we installed 3.7 because we're running 3.7.1 on the other site and wanted to see if that made any difference - it didn't).

                      it's at http://hchl.net/forums/ (no www)

                      EDIT: we have ImageMagick 6.2.8 at /usr/bin/

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        ImageMagick Test:


                        Could not create temporary file.

                        That's your problem. IM does not have access to a temp directory. The most likely cause of that specific error is that is that your 'upload_tmp_dir' setting is empty. You (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777.

                        You will also need to restart Apache after making this change.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • kjh411
                          Senior Member
                          • May 2007
                          • 194
                          • 3.7.x

                          #13
                          Thanks Steve.

                          That fixed it

                          Comment

                          • Steve Machol
                            Former Customer Support Manager
                            • Jul 2000
                            • 154488

                            #14
                            Glad to hear it.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment

                            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                            Working...