Attachment Uploads Failing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beaver
    Member
    • Oct 2005
    • 32
    • 3.5.x

    Attachment Uploads Failing

    I am having problems with file attachment uploads failing on a clean vb install.

    I intend to import a phpbb2 forum into vbulletin, and was making sure attachements where going to be stored in the filesystem instead of the db, when I noticed the issue.

    I can set-up the attachements folder ok, but when attempting to upload any files, I get an error saying the file could not be uploaded.

    Using the diagnostics tool in the control panel to try and upload doesnt work either and gives the following details:

    Pertinent PHP Settings

    file_uploads: On
    open_basedir: /usr/local/www/vhosts/timelessgaming.com/httpdocs:/tmp
    safe_mode: Off
    upload_tmp_dir: None
    upload_max_filesize: 2.00 MB

    Results

    No file uploaded and no local file found. The test cannot continue.
    I'm guessing that there might be an issue with the php settings on the server as all other aspects of vb are working ok.

    Hopefully its an easy 2 second fix.

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

    #2
    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:

    /usr/local/www/vhosts/timelessgaming.com/httpdocs/tmp

    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 777. 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

    • Beaver
      Member
      • Oct 2005
      • 32
      • 3.5.x

      #3
      Originally posted by Steve Machol
      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:

      /usr/local/www/vhosts/timelessgaming.com/httpdocs/tmp

      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 777. You will also need to restart Apache after making this change.
      Thanks, I'll give it a go & report back shortly.

      Comment

      • Beaver
        Member
        • Oct 2005
        • 32
        • 3.5.x

        #4
        Unfortunately, didnt work. :sad:

        I'll get the support guys from our host to sort out the php.ini file.

        Also, looking at the phpinfo on the site, safe_mode is actually set to off. Seems like its the 'openbase_dir' causing the problem.

        oh & forgot to mention the server is running php 5.2.1 (if that makes any difference)

        Comment

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

          #5
          Both of my suggestions need to be done to get file uploads to work.
          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

          • Beaver
            Member
            • Oct 2005
            • 32
            • 3.5.x

            #6
            Originally posted by Steve Machol
            Both of my suggestions need to be done to get file uploads to work.
            ah ok, I misread - thought I might have been able to get away with just the 1st part. :smile:

            Just waiting my host support guys to get back to me.

            Comment

            • Beaver
              Member
              • Oct 2005
              • 32
              • 3.5.x

              #7
              Good news, uploads are now working.

              In the end, all that had to be done was set the 'upload_tmp_dir' dir to /tmp.

              Thanks for the help.

              Comment

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