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

XF 1.1 Avatar Upload İssue

Discussion in 'Troubleshooting and Problems' started by rivolaz, Mar 15, 2012.

  1. rivolaz

    rivolaz Member

    Hello

    Avatar will not load.



    How can I solve.

    Thank you.
     
    Last edited by a moderator: Jul 21, 2013
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What error do you receive when uploading avatars?

    Are you able to attach image files to posts?
     
  3. rivolaz

    rivolaz Member

    Some of my forum member's avatar not displayed.

    avatars/l/0/557.jpg?1330168887 (403 Forbidden)

    I think the token key is wrong? How can I correct that issue?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Token key?

    Ensure the permissions on the directories and sub-directories are correct; data and internal_data should be 0777.
     
  5. rivolaz

    rivolaz Member

    avatars/l/0/557.jpg?1330168887 token number.

    permissions configured correctly.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    That's just a timestamp for caching purposes.
    It doesn't affect the file.

    That translates to Sat, 25 Feb 2012 11:21:27 GMT
     
  7. rivolaz

    rivolaz Member

    /data/avatars/l/0/1.jpg?1330168887

    /data/avatars/m/0/577.jpg?1331832851
     
    Last edited by a moderator: Jul 21, 2013
  8. mrGTB

    mrGTB Well-Known Member

    Worth trying if you use "Shared Hosting" like I did, had the same issue also. Try changing the directories from 777 to 755, including sub-directories that might be created to store avatars inside them. If you still can't see them, trying deleting all avatars there already using FTP and uploading one again from fresh with same 755 permission used for folders Brogan said.

    If the avatars themselves (the images) use 777 permission also, try changing them to 644 permission.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This one works:

    /data/avatars/l/0/1.jpg?1330168887

    I agree with mrGTB. A 403 error can be caused by file / folder permissions.
     
    Last edited by a moderator: Jul 21, 2013
  10. Coop1979

    Coop1979 Well-Known Member

    I'm also having 403 Forbidden errors on my newly converted test site. I tried changing all permissions to 777, then 644 for files, but none of it seemed to help. I'm on a dedicated server.

    Any other ideas?
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Where are you getting the 403 errors?
     
  12. Coop1979

    Coop1979 Well-Known Member

    I'm getting broken image links like the OP and then if I try to view the actual mysite.com/data/avatars/l/0/1.jpg I get a 403 error.
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Ok. Permissions are my first guess. For the data and internal_data directories you should try both 777 and 755. 644 won't work. And be sure to set permissions for all subdirectories inside of those two directories. Some FTP clients have a "recursive" option that does this.
     
  14. Coop1979

    Coop1979 Well-Known Member

    I just tried 777 and 755 on both of those directories and all sub-directories, but still getting permission errors.
     
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try removing (or temporarily renaming) any .htaccess files.

    It could also be due to some higher level server restriction such as mod_security. You should contact your host. Give them the URL to demonstrate the 403 error.
     
  16. Coop1979

    Coop1979 Well-Known Member

    I'm running my own server using Nginx as the webserver. No mod_security installed.

    Here's something else that is odd. When I view a thread with attachments the thumbnails for the attachments are dead, but when I click on the picture the full image comes up without any problem.

    PS - thanks for your help so far in helping me try to find the bottom of this rabbit hole.
     
  17. Coop1979

    Coop1979 Well-Known Member

    This morning I created a new test site and avatars and other images work fine on it. It is in a subdirectory of the site that I am building, and is a fresh install. I did not go through the import process that I did from vB 3.8 on my main test site.

    Does that offer any new clues as to how I can fix this? Should I just erase the databases and start fresh?
     
  18. Coop1979

    Coop1979 Well-Known Member

    Just to update everyone... I ended up removing the following code from my site's nginx .conf file that is supposed to get everything to play nicely with SEO Friendly URLs. Well, I removed it and guess what? Friendly URLs and javascript are still working, and I can now see all of my attachment and avatar photos.

    Code:
            location /data/ {
                    allow                          127.0.0.1;
                    deny                            all;
            }
     
            location /internal_data/ {
                    allow                          127.0.0.1;
                    deny                            all;
            }
     
            location /library/ {
                    allow                          127.0.0.1;
                    deny                            all;
            }
    
    I left in the following line, though:

    Code:
                try_files $uri $uri/ /index.php?$uri&$args;
     

Share This Page