Topic: problems with avitat
I am having problems adding an avitar to my profile. the image is 50x 60 pixels at 72 ppi jpg. when i up load i get a message saying the server was not able to upload the image.
Thanks,
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → problems with avitat
I am having problems adding an avitar to my profile. the image is 50x 60 pixels at 72 ppi jpg. when i up load i get a message saying the server was not able to upload the image.
Thanks,
Have you checked the permissions?
yeah i checked that out and everything is cool with that, but I am still getting the message that the server will not upload the avatar.
I saw in an archived message a solution that worked for a person that had the same problem as i do. That was to chmod the avatar directory using 777, but i dont know what that means to chmod the directory. Do chmod just the avatar file?
Well, no. You chmod the avatar directory itself. If you are using an FTP client to do it, it should just be a matter of right-clicking the avatar-directory and selecting something like "Change permissions" or something similar. Then, enter 777 or make sure that all checkboxes are checked.
Forgive me, Im an idiot - I am using DW - unfortunatly there is nothing like "change permissions" when i right click the avatar file. I just type the chmod into the ftp log thing, but i cant get it to work. Could you recommend and FTP client that has the feature you are talkinb about. Preferably a free one.
Thanks
Actually, I just figured out how to correctly CHMOD in Dreamweaver, but I am still getting the same error message. The CHMOD I am using is
site chmod 777 /var/www/html/img/avatars
it says successful, but when i try to upload the avatar I am still getting the same message.
I am at a loss
What is the exact error message you get?
The server was unable to save the uploaded file. Please contact the forum administrator at ...
Ok, open up profile.php and look up the following piece of code:
if ($uploaded_file['type'] == 'image/gif')
{
$temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.gif');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.gif', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.png');
}
else if ($uploaded_file['type'] == 'image/jpeg' || $uploaded_file['type'] == 'image/pjpeg')
{
$temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.jpg');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.jpg', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.png');
}
else if ($uploaded_file['type'] == 'image/png' || $uploaded_file['type'] == 'image/x-png')
{
$temp = @move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.png');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.png', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg');
}
Replace it with this:
if ($uploaded_file['type'] == 'image/gif')
{
$temp = move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.gif');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.gif', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.png');
}
else if ($uploaded_file['type'] == 'image/jpeg' || $uploaded_file['type'] == 'image/pjpeg')
{
$temp = move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.jpg');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.jpg', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.png');
}
else if ($uploaded_file['type'] == 'image/png' || $uploaded_file['type'] == 'image/x-png')
{
$temp = move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.png');
@chmod($pun_config['o_avatars_dir'].'/'.$id.'.png', 0644);
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif');
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg');
}
Then try again. It won't work now either, but you should get a more informative error message.
I did, and you are right, I still cannot upload it. It is giving me the same message except now this is on the top of the page:
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 680 is not allowed to access / owned by uid 0 in /home/virtual/site177/fst/var/www/html/profile.php on line 372
Also, while you are at it....I have another problem with categories - I added some new ones under admin and everything looks fine except they are not showing up on the message board. Only one is showing, and I set their orders...ie. 1,2,3 etc.
Sorry for the added request,
Thanks
nevermind duh.. .figured the categories thing out now
I did, and you are right, I still cannot upload it. It is giving me the same message except now this is on the top of the page:
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 680 is not allowed to access / owned by uid 0 in /home/virtual/site177/fst/var/www/html/profile.php on line 372
Hmm, what have you set your "Upload directory" to in admin/options? It should most likely be img/avatars.
IT WORKED! you are brilliant; thanks a lot for your help.
My pleasure. I'm just glad it didn't turn out to be a bug :D
PunBB Forums → PunBB 1.2 troubleshooting → problems with avitat
Powered by PunBB, supported by Informer Technologies, Inc.