warning when i upload an avatar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sun
    New Member
    • Dec 2007
    • 16
    • 4.0.0

    [Forum] warning when i upload an avatar

    I got an warning when i upload an avatar
    Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/') in [path]/includes/class_dm_userpic.php on line 204

    Warning: fopen() [function.fopen]: Filename cannot be empty in [path]/includes/class_image.php on line 333
    I installed default publishing suite 4.0.1
    PHP 5.2.9
    Apache 1.3

    How to fix it?
  • Matthew Gordon
    Senior Member
    • May 2002
    • 3243
    • 1.1.x

    #2
    Create a temp directory somewhere and CHMOD it to 777.

    In the Admin CP, under Options -> Server Settings and Optimization Options, you need to change "Safe Mode Temporary Directory" to the path to that directory.

    Comment

    • AntonLargiader
      Member
      • Dec 2009
      • 87
      • 4.0.0

      #3
      I am having the same problem. I did exactly as described above (and elsewhere) but when I try to add an avatar or profile image from a remote site I still get the open_basedir warning. If I upload from my computer, it works.

      Upload diagnostics are fine, in fact they told me that I could uncheck the 'safe mode' upload box, even though I am running in safe mode.

      My host says it's a permissions issue. First they had me turn SM off, that didn't have any effect. Then I created the /forum/tmp directory and 777'd it, checked the SM box and put in /forum/tmp for the path. Still didn't work. Upload diags said all is OK, you can uncheck the box so I did. Still didn't work for remote file link.

      What now?
      My VB forum: BMWRA

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24358
        • 5.7.X

        #4
        The path should be the server path to that directory rather than the relative path from your forum directory.

        Look for your server path in your phpinfo:

        AdminCP > Maintenance > View PHP Info

        At the bottom you will see a setting like this:

        _SERVER["DOCUMENT_ROOT"] ... /full/path/to/webroot

        For example, if the above path reads:

        /home/yoursite.com/public_html

        And you created the tmp directory in your FTP program at:

        /public_html/tmp

        Then the full path to the tmp directory is:

        /home/yoursite.com/public_html/tmp
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • AntonLargiader
          Member
          • Dec 2009
          • 87
          • 4.0.0

          #5
          Thanks! It's all working now; the upload_tmp_dir had not been set in the php.ini. That is now set and both methods of uploading work.

          Two questions:

          1) I am using safe mode but the upload tester tells me I don't need to have that checked in server settings. Is that correct?

          2) Even though I was unable to upload an image from a remote source, the upload test reported no problems. Isn't this a bit misleading?

          OK, 3) Could this (the path specifics) be in the manual, whenever it comes out?
          My VB forum: BMWRA

          Comment

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