1

Topic: Avatar Upload Problem

I'm experiencing a problem with uploading avatars where I get an error message that reads: 'You did not select a file to upload'. It worked when I first installed the forum a few months ago, but it doesnt now. I didnt change any of the code, but I did switch hosts since then.

The detailed error message reads like so:
'document.getElementByld('upload_avatar').req_file is null or not an object.

Please help me, I really can't figure out where the problem lies.

PS. The avatar dir is chmoded to 777, btw.

2

Re: Avatar Upload Problem

Well, I found another thread that delt with what seems to be the same situation (http://punbb.org/forums/viewtopic.php?id=5799), and at the end the person who had the problem said this:

"ok i find (sorry for this similar chat)
but perhaps someone need the answer:

mkdir /var/www/tmp (because of the chroot
chmod 1777 /var/www/tmp
in php.ini
upload_tmp_dir = /tmp"

Does anyone know what this person meant by all of that? I really can't figure out what they're getting at... but it looks like it's the key to fixing this problem I am having. Any help would be much appreciated!

Re: Avatar Upload Problem

I don't that is related. He was getting a different error. Could we get a link to your forums so we can check it out ourselves?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: Avatar Upload Problem

You can access the forums by clicking here.

You'll have to register a user name before being able to test uploading an avatar though... Let me know if you have any ideas for possible solutions to the problem. Thanks!

Re: Avatar Upload Problem

i get did not select file to upload hmm

6

Re: Avatar Upload Problem

Yep... that's pretty much the problem...

Re: Avatar Upload Problem

I would start by fixing all the JavaScript errors. Open up Javascript console in Firefox and visit the page.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: Avatar Upload Problem

The problem is that I'm not quite sure how to go about fixing it. The javascript console shows this error:

Error: document.getElementById("upload_avatar").req_file has no properties

Does anyone know how I'd go about assigning the property this error is talking about?

9

Re: Avatar Upload Problem

Okay, the problem was in my code after all. I was missing an underscore in the name of one of the input tags. Just one little underscore causing me so much trouble...

Anyway, thanks for the help!