Announcement

Collapse
No announcement yet.

Uploading files (e.g. custom avatar) with PHP Safe Mode

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

  • Uploading files (e.g. custom avatar) with PHP Safe Mode

    Hi,

    I wrote a hack for vB and a user encountered a problem with uploading files where a server has PHP safe mode enabled. I noticed that in vBulletin 2.2.6 (and probably 2.2.7 since I don't see any code changes in this area of the affected files), the same problem I am having exists in admin/user.php, where the admin can change a user's custom avatar.

    The error generated is something like this:

    Warning: Unable to create 'tmp/thumb-tetris.gif': No such file or directory in /usr/local/psa/home/vhosts/wcgalaxy.com/httpdocs/vbb/admin/user.php on line 693

    Warning: Unable to move '/tmp/php0UR0HD' to 'tmp/whatever.gif' in /usr/local/psa/home/vhosts/wcgalaxy.com/httpdocs/vbb/admin/user.php on line 693

    Now the interesting thing is, uploading a custom file works fine in the modifyavatar section of member.php (in the non-admin section of the site).

    I went through the code in both areas and it appears to be identical to me. So I'm kind of pulling my hair out trying to figure out why this code works in member.php and NOT in admin/user.php (note that this is all in a fresh vB with no hacks).

    My ONLY idea is that since global.php (included in member.php) is different from admin/global.php (included in admin/user.php) there is something going on in one and not the other.

    Any ideas why this might be happening? Is this a known bug in vBulletin, or just an oversight / weird situation? Since the file uploads work in member.php, I *know* the correct code is in there somewhere...

    Thanks.

    note: If this makes no sense, I can try and re-phrase it somehow...
    Last edited by futureal; Wed 4 Sep '02, 11:48pm.
    Editor, Xtreme RC Cars Magazine
    Owner, R/C Tech

  • #2
    Can anyone help?
    Or no one knows the problem?

    Comment


    • #3
      what versions of PHP are you both using ? and what versions of vB are you both using ? are you both using plesk and/or with safemode enabled ?
      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
      :: Nginx SPDY SSL - World Flags Demo [video results]
      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

      Comment


      • #4
        can both of your create a file named phpinfo.php and place this code in it and post the url/link to it from your web site

        <?
        phpinfo();
        ?>

        i.e. yourdomain.com/phpinfo.php
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment

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