MyBB Community Forums

Full Version: Unable to upload avatars
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I have searched the forums for this problem and tried everything I can think of so that´s why Im posting here.

The problem is that when anyone try to upload a avatar they get the "The file upload failed. Please choose a valid file and try again. " error message.
I searched here to try to figure out what could be wrong. I have checked and the uploads and the uploads/avatars folder have chmod 777. The admin panel confirms it. Avatars should be allowed in the settings. But still this error shows up. Earlier today/yesterday it was possible to upload avatars.

So Im woundering if there can be any settings that Im missing or a file that need to be changed? Maybe I changed a setting by mistake.

Things I have double checked:
Folders are chmod 777
The file is not too large in both file size and the image size.
The file is a valid .jpg file. I have tried to reupload a avatar that was uploaded before it stopped working.

We´re using MyBB 1.4.9, PHP 5.2.10 and MySQL 5.0.75
Seriously, there are maybe 7 prior posts dealing with this very issue over the entire forum's history, and they all end with "The avatar issue is fixed."

Please, we really need help with this.
Ask your host if they know anything about a temporary folder. Also check the avatar upload path is correct.
What is it that I need to know from my host about a temporary folder?
Just if it's working properly. There have been times when uploads haven't worked because there needs to be a temporary folder created to put it in, and if that can't be created, it won't work.
mkdir() is disabled. So that temp folder can´t be created. I guess I have to make it myself. But where should I put the folder?

Or is it another temp folder you´re talking about?
I don't think it's anything you can create, when any files are uploaded to a server, in MyBB or not, they're put in a temporary location first and then moved to the proper location, but if the temp folder can't be created, it won't upload.
I found out its

if(!is_uploaded_file($avatar['tmp_name']))
{
$ret['error'] = $lang->error_uploadfailedb;
return $ret;
}

in functions_upload.php that gives the error. Can you tell what´s wrong from that? If its the temp folder or if its something else?