Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [Error Message] Uploading Avatars: The file upload failed. Please choose a valid file and try again.
#1
Not Solved
I am running my forum on a dedicated Ubuntu server. Here's my phpinfo()

https://gist.github.com/anonymous/1dc58374efda56468d5e

Everything is writable. ./uploads/avatars is writable.

This happened after setting up my forum on my localhost server and uploading it to the dedicated server. There was already a forum in placed (but closed). I bought some files over, including the /uploads/ folder.

After changing all of the settings, everything seems to be working except for this problem.

If someone tries to upload a avatar, this error appears:
The file upload failed. Please choose a valid file and try again.
If someone tried to upload an avatar using a direct URL this error appears:
The URL you entered for your avatar does not appear to be valid. Please ensure you enter a valid URL.
#2
Not Solved
Could MyBB help me out? I can't figure out this problem for the life of me. I've been googling this problem for hours. There are no currently fixes for it.
#3
Not Solved
Are you able to upload attachments?

It sounds like this may be your problem - see the final post in the link


http://community.mybb.com/post-991982.html#pid991982
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#4
Not Solved
Edit: delayed response

there appears to be no temporary folder to transfer the files (TEMP & TMP under Environment section of php info)
after resolving the issue, remove the php info from public view
#5
Not Solved
(2013-07-11, 02:50 AM)Leefish Wrote: Are you able to upload attachments?

It sounds like this may be your problem - see the final post in the link


http://community.mybb.com/post-991982.html#pid991982

That makes sense, we had to move /tmp/ to /home/tmp/. Where could I fix this problem?
#6
Not Solved
Either you or your host need to set an upload_tmp_dir value in your PHP configuration. Then attachments should start to work.

Scratch that - looking at the php info you have it. I have asked a developer to look at this thread.

Thank you.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#7
Not Solved
Not sure where you saw that Leefish, on the gist it says:
Quote:upload_tmp_dir no value no value

So that's your issue as the uploaded files have no-where to go when they are first uploaded. Smile
This can be solved either by entering this in your php.ini or you can (depending on how you have PHP installed) use htaccess to dynamically set the value (using php_admin_value etc.).
Thanks, Polarbear541
#8
Not Solved
(2013-07-11, 12:56 PM)Polarbear541 Wrote: Not sure where you saw that Leefish, on the gist it says:
Quote:upload_tmp_dir no value no value

So that's your issue as the uploaded files have no-where to go when they are first uploaded. Smile
This can be solved either by entering this in your php.ini or you can (depending on how you have PHP installed) use htaccess to dynamically set the value (using php_admin_value etc.).

Wow, can't believe how I'm so new to this problem.

in php.ini I changed to:

php_value upload_tmp_dir "/home/tmp/"

Then did a /etc/init.d/apache2 restart

Same problem. I went to .htaccess (In /forum directory) and set

php_value upload_tmp_dir "/home/tmp/"

Nothing changed, phpinfo() is also the same. Sad I get the same problem. Am I doing anything wrong?
#9
Not Solved
Hmm,I am confused (this is why I called in Polarbear) as in MY php ini file I have the same values as you for upload_tmp_dir, and my users can upload an avatar/attachment.

Do you have a tmp folder on your server at the same level as the public html?
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#10
Not Solved
(2013-07-12, 06:16 AM)Leefish Wrote: Hmm,I am confused (this is why I called in Polarbear) as in MY php ini file I have the same values as you for upload_tmp_dir, and my users can upload an avatar/attachment.

Do you have a tmp folder on your server at the same level as the public html?

Do I have to restart my entire server to make changes to the php.ini work?

My set up I have /www/ instead of public_html. The /www/ has wordpress installed and /www/forum/ is where MyBB is.

There's a tmp folder in root/tmp/ but I set up the system to make sure everything goes to /home/tmp. That is all of the tmp folder I've seen.

Reminder that this started to happen after I uploaded the installed MyBB files to the server then switched some files around....


Forum Jump:


Users browsing this thread: 1 Guest(s)