Big Performance Tip: Specify a Custom Avatar Directory

Started by Something like that, September 30, 2007, 10:19:16 PM

Previous topic - Next topic

atokar

Note that if you're on a shared host that uses fakefs (fake file system) for your home directory, then you can even put 777 -R on your whole home directory and no one else other than root will be able to access it. Hosts such as Bluehost use this.


Something like that

Quote from: The Grinch on December 19, 2009, 06:03:55 AM
755 generally, however note that it may have consequences for you for updates as so on depending on how the host set it up.

Indeed. SMF requires write privileges to a few directory as the user PHP runs as. Most share hosts will run PHP scripts as a different user than the user's account; SMF requires 777 in those cases.

NoobDeveloper

hi all

I have applied this and it was working fine till last night.

1. All my members are of group REGULAR MEMBERS.
2. I am the only Admin,


now issue is ,  11 members only have been able to upload their avtars.

I tried using a frnds account who belongs to REGULAR MEMBER group.

I have made a directory in /public_html/avt where in AVT directory avatars will be stored. but i don't find any reason why users avats are not uploaded in this location.


note : Attachments and Avatars settings page, in Uploadable avatars section,
i have selected Membergroups allowed to upload an avatar to the : "Regular members"
Upload avatars to.. : specific directory
Upload directory: : /home/myforum/public_html/avt
Upload URL ::  http://xxxxx.com/avt


Also in error log of SMF i was not able to find anything..it was blank.

i can deleted and upload my avatar. but many of my regular members are not able to do so.  They dont get any error how ever image is not seen. hence i checked the avt directory but was not able to find the image named avatar_userid   Eg.  avatar_1.jpg

Something like that

Make sure /home/myforum/public_html/avt has 777 permissions. Apache/PHP needs to be able to write to it.

NoobDeveloper

Quote from: Kris Kringle on December 22, 2009, 01:41:02 PM
Make sure /home/myforum/public_html/avt has 777 permissions. Apache/PHP needs to be able to write to it.

its is dear...and still not able to upload the avatar.

MazdaClubTR

It was so simple ;

I have created a folder and given the write permission

I have given the folder name as ;

Upload directory:  /var/www/vhosts/<directoryname>

and

Upload URL : http://www.mazdaclubtr.com/<directoryname>

Saved

And runned ;

index.php?action=manageattachments;sa=moveAvatars

It was finished in a few seconds and now all avatars are displayed as images rather than attachments.

Thx for the hint :)

Chas Large

Having modified the system for the bug (2.0RC-2) SEE HERE I have created the folders as suggested.

I then ran.

index.php?action=manageattachments;sa=moveAvatars

But no avatars have been moved. I've checked via FTP and currently uploaded avatars still show as attachments. There is nothing in the maintenance queue or log to indicate that anything has happened.

I have uploaded a new avatar for a test user and this has been stored in the new folder and shows as an image, so some part of the process is working.

I'm guessing that the hidden command does not work in SMF 2.0 RC-2.

I will try the SQL query when I get home later.
HTH.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

The URL is different in 2.0 - index.php?action=admin;area=manageattachments;sa=moveAvatars I believe.

Chas Large

Quote from: Arantor on January 11, 2010, 09:42:04 AM
The URL is different in 2.0 - index.php?action=admin;area=manageattachments;sa=moveAvatars I believe.
Yep, that works fine, thanks (yet again!) Arantor.

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

Good to know that worked out Chas.

* Arantor wonders if Mark or Vekseid could get the above hint dropped into the relevant tip postings for our 2.0 users.

Something like that

Quote from: Arantor on January 11, 2010, 04:17:46 PM
Good to know that worked out Chas.

* Arantor wonders if Mark or Vekseid could get the above hint dropped into the relevant tip postings for our 2.0 users.

In which post? If it's mine, I can edit it...

Arantor

I can't remember offhand if Vekseid's master post just links here or mentions it as well, but if you could add it here too it would be appreciated.

Something like that

Quote from: Arantor on January 11, 2010, 04:53:46 PM
I can't remember offhand if Vekseid's master post just links here or mentions it as well, but if you could add it here too it would be appreciated.

Done. Let me know if it's still confusing.

Arantor

Marvellous thanks, it doesn't seem confusing at all - just it is now covered for both :)

ModelBoatMayhem

All great stuff here, thanks to everyone.

... how do I check it's made a difference?
     Check Awstats after a day or so?

Martin 
:)
That's my firm opinion.... but what do I know?!

Arantor

Awstats doesn't AFAIR give you load. Ideally you want to be able to check with your host (or if you're on a VPS type deal or more powerful, top or similar will be able to show you load) - you should see load drop pretty quickly.

Chas Large

I checked using FTP to inspect the contents of the new folder.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

steve51184

hi there i'm on smf 2.0 rc2 and i've gone to

QuoteAdministration Center » Attachments and Avatars » Avatar Settings

and on 'Upload avatars to...' i've selected 'specify directory' but i can type anything in the two below boxes?

curlin

Quote from: ppbz on February 08, 2010, 09:02:43 AM
hi there i'm on smf 2.0 rc2 and i've gone to

QuoteAdministration Center » Attachments and Avatars » Avatar Settings

and on 'Upload avatars to...' i've selected 'specify directory' but i can type anything in the two below boxes?

    I thought i was alone on this as it weirded me out  :o
Hoss Talk At Thoroughbred Junkie

Advertisement: