News:

Wondering if this will always be free?  See why free is better.

Main Menu

Avatars and folders

Started by Raffoz, January 29, 2014, 06:16:47 AM

Previous topic - Next topic

Raffoz

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 (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Storman™

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

What did you try ?

Raffoz

Change permissions for folder.
It was 755.
I think it was correct.

I tried with 777 too.
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Storman™

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.

Advertisement: