MyBB Community Forums

Full Version: Duplicate entry 'osula charles' for key 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
MyBB checks the username even without AJAX.
Then do you have any opinion how does generated this error ?


any opinion ?
No, I haven't seen this error before so it must be an issue of your forum.
but i used latest version of mybb alone ... (1.63 )
then how it could be ...?
bumbed .............@
bumbed.......
What's your MySQL version??
my
MyBB Version 1.6.3
PHP Version 5.3.5
SQL Engine MySQLi 5.0.92


this error only comes one or two per day
i can't locate whats the problem exactly for log this error ..since it shows often?
Are these people registering with names that already exist, or are these brand new names at they time they register..?? If the check for if a username exists is failing this often you have to have something different about your forum, nobody else is getting this error.
(2011-05-02, 12:11 PM)MattRogowski Wrote: [ -> ]If the check for if a username exists is failing

i think this error come while mybb fails to check whether its already registers user name

i used to check all error prone user names... found all of them already existed ...

( but not sure does they registered the name in second chance )
But that's exactly the point, unless you have changed something, it does check whether the username exists, which is why we asked if you've modified any files. It runs this:

function verify_username_exists()
{
	global $db;

	$username = &$this->data['username'];

	$uid_check = "";		
	if($this->data['uid'])
	{
		$uid_check = " AND uid!='{$this->data['uid']}'";
	}
		
	$query = $db->simple_select("users", "COUNT(uid) AS count", "LOWER(username)='".$db->escape_string(strtolower(trim($username)))."'{$uid_check}");
		
	$user_count = $db->fetch_field($query, "count");
	if($user_count > 0)
	{
		$this->set_error("username_exists", array($username));
		return true;
	}
	else
	{
		return false;
	}
}

This checks if the username already already exists, if it does exist, it'll return an error and it won't run the query to insert the user.
in which page this script exist ?
my next conclusion ....
while reading your post i got same error email ... i gone to phpmyadmin and analysed the user tables

error email is
Message
SQL Error: 1062 - Duplicate entry '********' for key 2
Query:
                       INSERT
                       INTO mybb_users (`username`,`password`,`salt`,`loginkey`,`email`,`postnum`,`avatar`,`avatartype`,`usergroup`,`additionalgroups`,`displaygroup`,`usertitle`,`regdate`,`lastactive`,`lastvisit`,`website`,`icq`,`aim`,`yahoo`,`msn`,`birthday`,`signature`,`allownotices`,`hideemail`,`subscriptionmethod`,`receivepms`,`receivefrombuddy`,`pmnotice`,`pmnotify`,`showsigs`,`showavatars`,`showquickreply`,`showredirect`,`tpp`,`ppp`,`invisible`,`style`,`timezone`,`dstcorrection`,`threadmode`,`daysprune`,`dateformat`,`timeformat`,`regip`,`longregip`,`language`,`showcodebuttons`,`away`,`awaydate`,`returndate`,`awayreason`,`notepad`,`referrer`,`referrals`,`buddylist`,`ignorelist`,`pmfolders`,`warningpoints`,`moderateposts`,`moderationtime`,`suspendposting`,`suspensiontime`,`coppauser`,`classicpostbit`,`usernotes`)
                       VALUES ('*******','95fc999a78c8ce4e27cdd79833a2a0ba','vqZs72zp','kfY6g8kjiswTuHkR4S6YwHyw555wH5qXE8BKkEl4hLCBBkq2s6','*********','0','','','2','','0','','1304396310','1304396310','1304396310','','0','','','','','','1','0','2','1','0','1','1','1','1','1','1','0','0','0','0','5.5','2','linear','0','','','125.19.77.114','2098417010','','1','0','0','0','','','0','0','','','','0','0','0','0','0','0','0','')


and my mysql table data shows
`mybb_users` (`uid`, `username`, `password`, `salt`, `loginkey`, `email`, `postnum`, `avatar`, `avatardimensions`, `avatartype`, `usergroup`, `additionalgroups`, `displaygroup`, `usertitle`, `regdate`, `lastactive`, `lastvisit`, `lastpost`, `website`, `icq`, `aim`, `yahoo`, `msn`, `birthday`, `birthdayprivacy`, `signature`, `allownotices`, `hideemail`, `subscriptionmethod`, `invisible`, `receivepms`, `pmnotice`, `pmnotify`, `threadmode`, `showsigs`, `showavatars`, `showquickreply`, `showredirect`, `ppp`, `tpp`, `daysprune`, `dateformat`, `timeformat`, `timezone`, `dst`, `dstcorrection`, `buddylist`, `ignorelist`, `style`, `away`, `awaydate`, `returndate`, `awayreason`, `pmfolders`, `notepad`, `referrer`, `referrals`, `reputation`, `regip`, `lastip`, `longregip`, `longlastip`, `language`, `timeonline`, `showcodebuttons`, `totalpms`, `unreadpms`, `warningpoints`, `moderateposts`, `moderationtime`, `suspendposting`, `suspensiontime`, `coppauser`, `classicpostbit`, `visiteprofile`, `metagsis`, `ganalyticsdb`, `thx`, `thxcount`, `newcomments`, `receivefrombuddy`, `suspendsignature`, `suspendsigtime`, `loginattempts`, `failedlogin`, `usernotes`) VALUES
(188896, '********', '8c4508bdb812afaed3167af706ba64a2', 'nOUacOpH', 'sAbfqcqp7AmkLAaDEiWmUKFpWejn3Fq7sFHn4euQB5j7gtC8K6', '*********', 0, '', '', '', 2, '', 0, '', 1304396310, 1304396310, 1304396310, 0, '', '0', '', '', '', '', 'all', '', 1, 0, 2, 0, 1, 1, 1, 'linear', 1, 1, 1, 1, 0, 0, 0, '', '', '5.5', 0, 2, '', '', 0, 0, 0, '0', '', '', '', 0, 0, 0, '125.19.77.114', '', 2098417010, 0, '', 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, '');


please note ... here user name and email id i changed to ******** (for users confidential data)

let's observe the data

in database table details 'lastip' is blank and 'longlastip' is 0 and 'timeonline' also 0 all other values seems normal



what does it mean ....?
does any one have sniff about the exact issue ?


Advance thanks....



Bumbed .................!
Pages: 1 2 3