Advertisement:

Author Topic: Avatars and folders  (Read 869 times)

Offline Raffaele1977

  • Full Member
  • ***
  • Posts: 446
Avatars and folders
« on: January 29, 2014, 06:16:47 AM »
I tried to do this:

Move your uploaded avatars directory
In the administration panel, go to Attachments and Avatars, and then go to Avatar settings.
For Upload avatars to... select: Specific directory... For Upload directory: put in the raw, publicly accessible server directory you want them added to ie /var/www/yoursite/docs/forums/avs
So assuming /docs was your webroot, you would put /forums/avs for your upload URL. Do not do what I did and make it a subdirectory of your main avatars directory, SMF still handles it like an attachment directory for some reason so if someone uploads a .png avatar, someone else decides to use it and the first person replaces it with a .jpg avatar, the first will be deleted.
The benefit of this borders on the ridiculous. Every single avatar load is another php call, which loads a session, the user's settings and permissions, the board and its theme. In addition, two additional calls to the database are made to load the avatar itself, and to increment the view counter. So not only are you reducing the processor load on your server, but you are also reducing your database load. If five different avatars are displayed on a page, that's five additional php calls and dozens of database queries getting made.
After you do this access index.php?action=manageattachments;sa=moveAvatars to use the hidden feature to move your avatars over.

font: http://wiki.simplemachines.org/smf/Performance_enhancements#Disable_hostname_lookups



But it says to me that
La cartella di caricamento degli allegati non ha i permessi di scrittura. Non è quindi possibile salvare allegati o avatar.
it means
Folder hasn't write permissions. No possible to save attachments and avatars.

I tried some things but i couldn't do it.

Can u help me? :)

Thanks.
MacOsX - 10.14.5
SMF 2.0.15
Safari (last) or Chrome (last)

Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: Avatars and folders
« Reply #1 on: January 29, 2014, 06:50:48 AM »
Quote
I tried some things but i couldn't do it.

What did you try ?
Any Backup method is bettter than no Backup method....

Offline Raffaele1977

  • Full Member
  • ***
  • Posts: 446
Re: Avatars and folders
« Reply #2 on: January 29, 2014, 07:09:31 AM »
Change permissions for folder.
It was 755.
I think it was correct.

I tried with 777 too.
MacOsX - 10.14.5
SMF 2.0.15
Safari (last) or Chrome (last)

Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: Avatars and folders
« Reply #3 on: January 29, 2014, 07:33:03 AM »
Are you sure the path is correct ?

Quote
/var/www/yoursite/docs/forums/avs

The above is only an example, yours might be different to that. Have you checked what yours should be ? Also make sure there is no "/" at the end.
Any Backup method is bettter than no Backup method....