Avatar and Attach Image Problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MINI2.com
    New Member
    • Oct 2001
    • 20

    Avatar and Attach Image Problems

    having a bit of a problem getting avatars and images to attach to messages.

    When I attach an image I get these errors:

    Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/plesk/apache/vhosts/mini2.com/httpdocs/vbulletin/admin/functions.php on line 1636

    Warning: fopen("/tmp/min.jpg","rb") - Operation not permitted in /usr/local/plesk/apache/vhosts/mini2.com/httpdocs/vbulletin/admin/functions.php on line 1636

    Warning: Supplied argument is not a valid File-Handle resource in /usr/local/plesk/apache/vhosts/mini2.com/httpdocs/vbulletin/admin/functions.php on line 1637

    Warning: Supplied argument is not a valid File-Handle resource in /usr/local/plesk/apache/vhosts/mini2.com/httpdocs/vbulletin/admin/functions.php on line 1638

    When I change my avatar in the cp, it doesn't show any errors but the image doesn't show up, just the red x. I've tried commenting out the 3 lines in the functions.php :
    elseif (!$allowimgsizefailure) {
    eval("standarderror(\"".gettemplate("error_avatarnotimage")."\");");
    }

    which didn't help. Also been messing with the Allow Image Size Checking Failure? option and that hasn't helped. I noticed that there is no avatars folder in my images dir so I created it, gave it 777 permissions and retried everything again with still no luck.

    No files are getting uploaded to the avatars or attach folders.

    Any help would be great as I would like to go live with this as soon as possible.

    Some info:
    PHP 4.0.6
    MySQL 3.23.36
    Plesk 2 on Redhat 7.1
    GD Libraries are installed(not sure if that matters)
    vBulletin 2.2.1
    For meeting people, and arranging events/activities in your local area!


    Cheers and thanks in advance
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Are you sure you have /tmp set to &&& file permissions. This usually can only be done by root so if you don't have root access then it's probably not/ You could always point the upload directory to a directory under your control and make sure it's chmod'd to 777, i.e. /home/user/tmp

    By the way, I've heard that plesk is evil! This may be part of your 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

    • Mincer
      Member
      • Nov 2001
      • 39

      #3
      I did this this afternoon.

      Create a directory in the mainboard directory called tmp (so that the folder is the same level as the folder 'images').

      chmod that directory to 777

      In the vBulletin Options in the admin panel, go the the 'Upload Options section and set the following options
      • Upload In Safe Mode? Yes
      • Safe Mode Temp Directory tmp (no leading or trailing slashes)
      • Allow Image Size Checking Failure? No (you may have to set this to yes, but it can enable someone to upload a massive file)


      This solved it for me, and I'm running on plesk.
      Team Phoenix Rising
      Distributed Computing Team

      Comment

      • MINI2.com
        New Member
        • Oct 2001
        • 20

        #4
        It is my dedicated server so I am root and /tmp is at 777 as i use it for upload dir for other stuff as well. I have other scripts that allow images to be uploaded and this is running under the same user etc as those scripts so it has the correct authority.

        I'll try your suggestions Mincer and see if that works. Additionally I have safe mode turned off so it shouldn't be using that directory at all - I have it set in the cp to not upload in safe mode so it should go straight to the avatars folder which i also set to 777. I assume the avatars folder is in <vb-install-dir>/images/avatars/ it wasn't there so i just created it and set the owner to the user that runs vB.

        Cheers

        Comment

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

          #5
          Hmmm, is the images folder set to 777 as well? I recently helped someone with a similar problem and I had to set both images and images/avatar to 777 for it 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

          • MINI2.com
            New Member
            • Oct 2001
            • 20

            #6
            Thank Mincer - it worked for me as well.

            Question - by having a directory in the vbullentin install dir that has 777 permissions - could this cause any security hazards? I'm assuming that vB checks for all file types uploaded and that it won't allow malicious scripts to be uploaded. Any how if there is any extra percautions that need to be taken, please let me know.

            Cheers

            Comment

            • The Prohacker
              Senior Member
              • Apr 2001
              • 1212
              • 3.8.x

              #7
              Originally posted by MINI2.com
              Question - by having a directory in the vbullentin install dir that has 777 permissions - could this cause any security hazards? I'm assuming that vB checks for all file types uploaded and that it won't allow malicious scripts to be uploaded. Any how if there is any extra percautions that need to be taken, please let me know.

              The uploads are put into the database, so people couldn't do something like that, but if your are on a shared server, and the folder being 777 that would allow other users to alter your files in that directory which could be a major security hole for your site...

              If your on a dedicated box, you should be fine...


              [edit]
              Sorry, just read the entire thread, you are on a dedicated box, so that wouldn't be a security problem as long as only you have the a site hosted there.....
              [/edit]

              Comment

              • MINI2.com
                New Member
                • Oct 2001
                • 20

                #8
                thanks prohacker....just wanted to make sure everything would be fine.

                Comment

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