phpBBHacks.com - Call to undefined function: phpbb_clean_username()
phpBBHacks.com, the place for phpBB users
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Troubleshooting
 See a User Guidelines violation? Please contact us.
Author Message

Spinebuster
Dedicated User

Joined: 21 Apr 2003
Posts: 3379
Location: IN

PostPosted: May 6th 2005, 5:04 pm    Post subject: Call to undefined function: phpbb_clean_username() Reply with quote

Quote:
Fatal error: Call to undefined function: phpbb_clean_username() in /home/user/public_html/phpBB2/login.php on line 57


This error normally happens when you install a hack that was coded for phpBB versions 2.0.11 and higher. If you're running an older version of phpBB and havent had the time to upgrade yet, simply adding this section of code to your includes/functions.php file will make the error message go away.

Code:
// added at phpBB 2.0.11 to properly format the username
function phpbb_clean_username($username)
{
   $username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25);
   $username = phpbb_rtrim($username, "\\");   
   $username = str_replace("'", "\'", $username);

   return $username;
}

// added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0)
function phpbb_rtrim($str, $charlist = false)
{
   if ($charlist === false)
   {
      return rtrim($str);
   }
   
   $php_version = explode('.', PHP_VERSION);

   // php version < 4.1.0
   if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))
   {
      while ($str{strlen($str)-1} == $charlist)
      {
         $str = substr($str, 0, strlen($str)-1);
      }
   }
   else
   {
      $str = rtrim($str, $charlist);
   }

   return $str;
}

_________________
«Online Sports League - Built By Gamers For Gamers
«Guaranteed Phpbb Support «Custom Graphics & Templates «Phpbb Installation Tutorials
«My Released Mods
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Troubleshooting All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.