Topic: Error when uploading avatars

"The server was unable to save the uploaded file. Please contact the forum administrator at *."

Any ideas on what might be causing this, my avatar directory has its permissions set at 777

Thanks, and by the way the forums are located at http://duplexlan.com

Re: Error when uploading avatars

Open up profile.php, look for:

if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

And remove the @ before move_uploaded_file. Then try again and PHP should output a more detailed error message.

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

Re: Error when uploading avatars

Ok, here's what i got when trying to upload

"Warning: move_uploaded_file(img/avatars/2.tmp): failed to open stream: Permission denied in /home/cpanel/duplex/public_html/forum/profile.php on line 365

Warning: move_uploaded_file(): Unable to move '/tmp/phpyqXeVn' to 'img/avatars/2.tmp' in /home/cpanel/duplex/public_html/forum/profile.php on line 365"

So naturally i adjusted the file permissions for profile.php to 777, but still had no success
Your help is appreciated

Re: Error when uploading avatars

http://us3.php.net/manual/en/function.m … d-file.php
Search for "permission denied" on this page

5

Re: Error when uploading avatars

uplink wrote:

So naturally i adjusted the file permissions for profile.php to 777, but still had no success
Your help is appreciated

uoy mast set permission for folder img/avatars/

Re: Error when uploading avatars

Ok well it turns out that when i changed the permissions through cpanel it didn't seem to work.
I've fixed it now - Cheers