Upload Avatar Error

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Captain_Kirk76
Registered User
Posts: 52
Joined: Wed May 31, 2006 1:15 pm

Upload Avatar Error

Post by Captain_Kirk76 »

SOme of my members get this. I preusme it is Uploading avatars?

Code: Select all

Unable to upload file

DEBUG MODE

Line : 223
File : usercp_avatar.php
User avatar
Avaya
Registered User
Posts: 73
Joined: Thu Mar 08, 2007 7:08 pm
Location: Vancouver, Canada
Contact:

Re: Upload Avatar Error

Post by Avaya »

I'm sure you've looked in to this already, but have you set the permissions for the avatar upload directory to read an write (777)?
My website: SixSeventyOne.net
Get the best! Browse with Image
Captain_Kirk76
Registered User
Posts: 52
Joined: Wed May 31, 2006 1:15 pm

Re: Upload Avatar Error

Post by Captain_Kirk76 »

Yep, tis 777 :(
User avatar
Phil
Former Team Member
Posts: 10403
Joined: Sat Nov 25, 2006 4:11 am
Name: Phil Crumm
Contact:

Re: Upload Avatar Error

Post by Phil »

Change anything recently? (Install a MOD, etc.)
Moving on, with the wind. | My Corner of the Web
Captain_Kirk76
Registered User
Posts: 52
Joined: Wed May 31, 2006 1:15 pm

Re: Upload Avatar Error

Post by Captain_Kirk76 »

nope...
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Upload Avatar Error

Post by karlsemple »

Try this

Things to change in the includes\usercp_avatar.php:



Old Code


Code: Select all


switch( $type ) 

{ 

   case 'jpeg': 

   case 'pjpeg': 

   case 'jpg': 

      return '.jpg'; 

      break; 

   case 'gif': 

      return '.gif'; 

      break; 

   case 'png': 

      return '.png'; 

      break; 

   default: 

      $error = true; 

      $error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; 

      break; 

} 



New Code


Code: Select all


switch( $type ) 

{ 

   case 'jpeg': 

   case 'pjpeg': 

   case 'image/pjpeg': 

   case 'jpg': 

      return '.jpg'; 

      break; 

   case 'image/gif': 

   case 'gif': 

      return '.gif'; 

      break; 

   case 'image/x-png': 

   case 'png': 

      return '.png'; 

      break; 

   default: 

      $error = true; 

      $error_msg = (!empty($error_msg)) ? $error_msg . '<br />' . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; 

      break; 

} 

Image
Locked

Return to “2.0.x Support Forum”