1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Received error during avatar upload

Discussion in 'Troubleshooting and Problems' started by ILiuz, Mar 21, 2011.

  1. ILiuz

    ILiuz New Member

    The data directory and all subdirectories are set to 777. Below is the error log:

    Code:
    ErrorException: rename(/var/tmp/phpZfmdjk,/home/users/spillegal/www/data/avatars/l/0/294.jpg) [<a href='function.rename'>function.rename</a>]: Operation not permitted - library/XenForo/Model/Avatar.php:337
    Generated By: Buggz, 7 minutes ago
    
    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError('/var/tmp/phpZfm...', '/home/users/spi...')
    #1 /home/users/spillegal/www/library/XenForo/Model/Avatar.php(337): rename(294, 'l', '/var/tmp/phpZfm...')
    #2 /home/users/spillegal/www/library/XenForo/Model/Avatar.php(201): XenForo_Model_Avatar->_writeAvatar(294, '/var/tmp/phpZfm...', 1, 96, 96, Array)
    #3 /home/users/spillegal/www/library/XenForo/Model/Avatar.php(69): XenForo_Model_Avatar->applyAvatar(Object(XenForo_Upload), 294, Array)
    #4 /home/users/spillegal/www/library/XenForo/ControllerPublic/Account.php(489): XenForo_Model_Avatar->uploadAvatar()
    #5 /home/users/spillegal/www/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Account->actionAvatarUpload(Object(XenForo_RouteMatch))
    #6 /home/users/spillegal/www/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch()
    #7 /home/users/spillegal/www/index.php(17): XenForo_FrontController->run()
    #8 {main}
    
    Request State
    array(3) {
      ["url"] => string(45) "http://www.spillegal.no/account/avatar-upload"
      ["_GET"] => array(0) {
      }
      ["_POST"] => array(8) {
        ["use_gravatar"] => string(1) "0"
        ["avatar_date"] => string(1) "0"
        ["avatar_crop_x"] => string(1) "0"
        ["avatar_crop_y"] => string(1) "0"
        ["_xfToken"] => string(55) "294,1300700721,cc7bd99e7622c7508111395fdd8e3b1319eaa73d"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(9) "json-text"
        ["_xfUploader"] => string(1) "1"
      }
    }
    Any suggestions?
     
  2. Kier

    Kier XenForo Developer Staff Member

    Is it just avatars that have this problem, or do you have the same issue with uploading files with posts?
     
  3. ILiuz

    ILiuz New Member

    I just checked with one of my members who still cannot upload an avatar, and he was able to upload an image with a post (I don't normally allow this, that's why I only had one to test it out).
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Looks like a permission problem to me. Make doubly sure that the data directory is writable. If you have shell access to the server then you can run this command to recursively make the entire directory writable:

    Code:
    chmod -R 777 /home/users/spillegal/www/data/
    
     
  5. Kier

    Kier XenForo Developer Staff Member

    The recursively part of Jake's reply may be what you are missing. Please let us know how you get on. :)
     
  6. ILiuz

    ILiuz New Member

    Hello again,

    I've contacted my host to whitelist your IP addresses, Kier, I'll let you know the details on my support ticket when it's done. I just found out I also have to contact my host to enable SSH access, so I don't have that as of now. So the only thing I'm able to do right now is set the permissions for the data directory and all its subdirectories to 777 (this is a setting in Filezilla), which I've done. I still have the same problem.

    But thanks a lot to both of you for all the help so far!

    Edited: Contacted my host to enable SSH as well, since it'll probably come in handy. As I said, I'll give you the details when my host adds the IP addresses, Kier.
     
    Kier likes this.

Share This Page