Announcement

Collapse
No announcement yet.

Update filesystem path to attachments following server move

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update filesystem path to attachments following server move

    None of my attachments are working and I can't seem to change the settings through the admin CP, I had attachments stored in my file system, and when I go to change their location which is still listed via the path/structure of my old server, it constantly tells me it can't perform the operation. The attachments folders are all transferred and 777'd. Any ideas?
    Aye

  • #2
    What is the exact message you are getting?
    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


    • #3
      The storage type page says;
      Attachments are currently being stored in the filesystem at /home/sto/public_html/messageboard/images/attachments

      Which is obviously no longer the case since our move, so when I enter the new path I get this.
      We attempted to write a test file to /var/www/vhosts/startrek-online.net/httpdocs/attachments, but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.

      (Note: This is the same even if the folder is located inside my forum folder/images... anywhere. It is definitely 777'd)
      Aye

      Comment


      • #4
        I don't see how you could get that error is that directory was chmod'd to 777. I would doublecheck both that path and the permissions.
        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


        • #5
          Please try:

          AdminCP -> Maintenance -> Diagnostics -> Upload
          Want to take your board beyond the standard vBulletin features?
          Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

          Comment


          • #6
            Originally posted by Marco van Herwaarden View Post
            Please try:

            AdminCP -> Maintenance -> Diagnostics -> Upload
            These are the results I got from that;

            file_uploads: On
            open_basedir: /var/www/vhosts/startrek-online.net/httpdocs:/tmp
            safe_mode: On
            upload_tmp_dir: None
            upload_max_filesize: 2.00 MB

            Help
            Results
            No errors occurred while opening the uploaded file for reading.
            As for the attachments directory, it is definitely chmod 777'd, though the events described in post #3 continue to take place.
            Aye

            Comment


            • #7
              You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your httpdocs directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

              Also the php.ini setting for 'upload_tmp_dir' is empty. It's possible 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


              • #8
                Sounds like fun. Thanks for the help, guys.
                Aye

                Comment


                • #9
                  Originally posted by Steve Machol View Post
                  You have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your httpdocs directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:
                  Will be?

                  I've updated the php.ini file to point at the server's tmp directory which is chmod 1777, so the line now reads;

                  Code:
                  ;upload_tmp_dir = /tmp
                  and apache has been rebooted.

                  In turn, in he admin cp I've enabled safe mod upload and pointed it at a 777 directory named tmp inside httpdocs, path;

                  /var/www/vhosts/startrek-online.net/httpdocs/tmp

                  But I'm still getting this when I run a diagnostic;

                  file_uploads: On
                  open_basedir: /var/www/vhosts/startrek-online.net/httpdocs:/tmp
                  safe_mode: On
                  upload_tmp_dir: None
                  upload_max_filesize: 2.00 MB
                  So I'm assuming something's still wrong. Your help is appreciated guys.
                  Aye

                  Comment


                  • #10
                    You commented out this line:

                    ;upload_tmp_dir = /tmp

                    It should be:

                    upload_tmp_dir = /tmp
                    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


                    • #11
                      Originally posted by Steve Machol View Post
                      You commented out this line:

                      ;upload_tmp_dir = /tmp

                      It should be:

                      upload_tmp_dir = /tmp
                      Silly me.

                      Okay, the diagnostic output has now been updated and shows;

                      file_uploads: On
                      open_basedir: /var/www/vhosts/startrek-online.net/httpdocs:/tmp
                      safe_mode: On
                      upload_tmp_dir: /tmp
                      upload_max_filesize: 2.00 MB

                      Help
                      Results
                      No errors occurred while opening the uploaded file for reading. You should be able to turn off the "Upload In Safe Mode?" option without any adverse effects.
                      But when I go to

                      Attachments>Attachment Storage Type> Move Items to a Different Directory> and input the new path, I'm still getting this error;

                      We attempted to write a test file to /var/www/vhosts/startrek-online.net/httpdocs/attachments, but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.
                      Should the path for Safe Mode Temporary Directory be;

                      /var/www/vhosts/startrek-online.net/httpdocs/tmp

                      ?
                      Aye

                      Comment


                      • #12
                        Sorry, you will need to disable Safe Mode in php.ini if you want to store attachments in the file system. This won't work with Safe Mode enabled.
                        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


                        • #13
                          Originally posted by Steve Machol View Post
                          Sorry, you will need to disable Safe Mode in php.ini if you want to store attachments in the file system. This won't work with Safe Mode enabled.
                          Interestingly, according to php.ini in my root, the same file I updated the /tmp path in which vB then recognised;

                          Code:
                          ;
                          ; Safe Mode
                          ;
                          safe_mode=off
                          So I'm at a bit of a loss there :s

                          Obviously, I can't move them into the database because the filepath to my attachments cant be updated.

                          /tmp is definitely 1777
                          /var/www/vhosts/startrek-online.net/httpdocs/attachments is definitely 777

                          If php.ini shows safe_mode=off - why is vB showing it is on?
                          Aye

                          Comment


                          • #14
                            Maybe you are editing the wrong php.ini file. Or maybe there is another user specific safe mode setting in php.ini.
                            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


                            • #15
                              Originally posted by Caiman View Post
                              If php.ini shows safe_mode=off - why is vB showing it is on?
                              In your phpinfo, what is the path it reports for php.ini?
                              Translations provided by Google.

                              Wayne Luke
                              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                              vBulletin 5 Documentation - Updated every Friday. Report issues here.
                              vBulletin 5 API - Full / Mobile
                              I am not currently available for vB Messenger Chats.

                              Comment

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