View Full Version : Can't Save Avatars
Dj Smuggla
12-04-2010, 05:47 PM
Since i moved host i cant save avatars.
When I try to edit or add a new avatar it says "Unable to save image."
Im guessing its got something to do with the host, but what?
Lynne
12-04-2010, 07:59 PM
What happens if you go to Maintenance > Diagnostics > Upload ?
Dj Smuggla
12-04-2010, 09:11 PM
Results
No errors occurred while opening the uploaded file for reading.
But the open_basedir: has a weird file path:
/home/httpd/mydomain.com/httpdocs:/home/httpd/mydomain.com/mydomain.com:/home/admin/:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script
Lynne
12-04-2010, 09:21 PM
It looks lik you have open_basedir restrictions on your server. To get uploads to work you need to create a 'tmp' subdirectory under your main hosting directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:
/home/yoursite/tmp
Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Temporary Directory
Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Upload Enabled -> Yes
Also the php.ini setting for 'upload_tmp_dir' may be empty. It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777. You will also need to restart Apache after making this change.
You can point it to any of those directories listed in that line as long as you verify that the directory is chmod to 777.
Dj Smuggla
12-05-2010, 12:01 PM
I've done what you said about the tmp directory, but it's giving this error: Upload of file failed.
Also the php.ini setting for 'upload_tmp_dir' may be empty. It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777. You will also need to restart Apache after making this change.
You can point it to any of those directories listed in that line as long as you verify that the directory is chmod to 777.
Where would i find the php.ini file, i cant seam to see it outside & inside the forum directory?
--------------- Added 1291561497 at 1291561497 ---------------
I've told my host about it, they edited the php.ini, but it still comes up with this error:
Upload of file failed.
Although the avatar is saving, but it still gives that error.
--------------- Added 1291567032 at 1291567032 ---------------
My host has tried a few things but it still gives that error.
They replyed with:
That directory /customavatars is chmoded to 777. Everyone can upload to that directory. There is no open_basedir or safe_mode enabled on your VPS.
Lynne
12-05-2010, 02:55 PM
Are you storing avatars in the /customavatars directory? Can you tell us exact what you are told when you go to maintenance > disagnostics > upload? And what do you have exactly in vboptions > server settings > safe mode upload enabled and safe mode temporary directory? And, what do you have for admincp > avatars > user picture storage type? And if in a directory, exactly what is the avatar file path and url to avatars path? I need all of those things.
Dj Smuggla
12-06-2010, 01:22 PM
I done what you said:
create a 'tmp' subdirectory under your main hosting directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:
/home/yoursite/tmp
Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Temporary Directory
Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Upload Enabled -> Yes
------------------------------------------------------------------------------------
This is what it said when i went to maintenance > disagnostics > upload
Pertinent PHP Settings
file_uploads: On
open_basedir: /home/httpd/mydomain.com/httpdocs:/home/httpd/mydomain.com/mydomain.com:/home/admin/:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script
safe_mode: Off
upload_tmp_dir: /tmp/
upload_max_filesize: 2.00 MB
Results
No errors occurred while opening the uploaded file for reading. You should be able to turn off the "Upload In Safe Mode?" option without any adverse effects.
Server Settings
Safe Mode Upload Enabled = Yes
Safe Mode Temporary Directory = /tmp (chmoded to 777)
Avatars:
Avatars are currently being served from the filesystem at ./customavatars (chmoded to 777)
Profile pictures are currently being served from the filesystem at ./customprofilepics (chmoded to 777)
Signature pictures are currently being served from the filesystem at ./signaturepics (chmoded to 777)
Lynne
12-06-2010, 01:56 PM
Your path to your temp dir shouldn't be /tmp, it should be /home/yoursite/tmp (or something similar - but a FULL path).
Dj Smuggla
12-06-2010, 04:57 PM
I noticed earlier that it's working for me but not for some members.
After we moved servers some members avatars are not showing, they just got a link that says 'username's Avatar'
https://vborg.vbsupport.ru/external/2010/12/53.png
I dont know why they wont show because all the files from the old server are on the new server. I've logged in as them & tried to upload a avatar, but it says "Upload of file failed."
It was doing that to me aswell, but i tried it earlier & it works fine for me.
I've checked the permissions, there ok but the members that its happening to are from different groups.
Lynne
12-06-2010, 05:36 PM
If they just have a link, then that means the avatar is not present where it is supposed to be or the permissions are not correct. If your avatars in in the filesystem, make sure all the directories recursively are chmod to 777.
Dj Smuggla
12-06-2010, 07:30 PM
I've tripple checked the permissions of /customavatars & /tmp & the usergroup permissions, there all ok.
Like you said it's like their avatar isnt there. They might of uploaded it just before i shut down the forum to move servers. I had to use a backup from 3 days before, so i lost a few posts ect...
It's just weird that they cant upload a new one.
Btw im using vboptimise, if that makes any difference. I've flushed the cache but its still the same.
Lynne
12-06-2010, 10:38 PM
Disable all your modifications and then see if your users can upload avatars.
Also, go look in the filesystem and see if you can find his avatar.
Dj Smuggla
12-07-2010, 01:07 PM
I managed to remove the members messed up avatar, via acp -> Quick User Finder.
Then he had the sites default avatar from the default avatar mod.
Then i logged in as that member, went to upload a avatar, but it still said Unable to save image & the link was there again usernames's Avatar.
I went back to the acp -> Quick User Finder & tried to upload a avatar for him from there, but it still said Unable to save image.
Also i dissabled all my mods with this 'define('DISABLE_HOOKS', true);' & tried to upload a avatar for him threw the acp, but same error: Unable to save image
I couldn't find his avatar in /customavatars where the rest are.
Lynne
12-07-2010, 02:16 PM
So you can upload avatars for your admin account, but not for this users account? Did you try uploading the same avatar you successfully uploaded to your admin account for him? Does that avatar work? Is the avatar you are trying to upload for him within the specs you allow for avatars?
Dj Smuggla
12-07-2010, 03:36 PM
Yes its just a few members about 5 that i've seen, there from different usergroups aswell.
I tried uploading the same avatar that i used, but it didn't work same error. Yes well within the specs.
I've gone into Update Counters -> Rebuild Custom Avatar Thumbnails & Rebuild Avatar Thumbnails, But its the same.
Shall i try to repair the avatar table here? -> Repair / Optimize Tables
Lynne
12-08-2010, 01:26 AM
If you can't upload the same avatar that you successfully uploaded for yourself, then you have some setting different for the users in that usergroup compared to your usergroup. It could be a secondary usergroup, or the primary usergroup. Try comparing them.
Dj Smuggla
12-08-2010, 02:57 PM
The usergroup options are the same apart from the size of the avatar, but the one i was uploading was small well within the size limit.
As i said this has happened to members from different usergroups, only the ones that were around before the server move. It's only effected a few of them tho, not all the old members.
I just signed up for a new account, (normal member group) & i can upload a new avatar.
So it's just about 5 - 6 members (that ive seen) from 3 different usergroups, who's avatar shows up as a link & when they go to upload a avatar they get this message:
Unable to save image.
ROTPAR
10-15-2012, 07:29 AM
Same problem here... after a server move I am not able to save avatars or attachments. All file permissions are ok and also all user permissions are correct. I have no idea what to do.
Lynne
10-15-2012, 02:38 PM
Please start your own thread about your problem. (Are you sure you even meant to post in the vb3 section?)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.