NukeResources :: View topic - Account Creation Fails - 7.9 NP 3.2
Account Creation Fails - 7.9 NP 3.2
Posted: Thu Apr 27, 2006 5:54 am
LupinOne
Resource Newbie
Joined: Apr 11, 2005
Posts: 29
Situation: New site user attemptes to register with site. Receives email and clicks onlink to activate. Site responds that they are now activated and to please login from a specified link.
User then attempts to login and it fails.
In testing, the information is getting sent to the nuke_users_temp table, but apparently NOT to the nuke_users once the user uses the activation link.
I tried to add someone to the site via the admin panel and when I clicked the submit button to enter them in, the page was all white (didn't load/execute). A check of the database showed that the test account I tried to create was NOT in the users table.
Would appreciate any help. I have already been working through some of the issues covers in this thread: http://evaders.swrebellion.com/forums/postp128.html#128
Lupin
Posted: Thu Apr 27, 2006 10:48 am
Evaders99
Resource Master
Joined: May 25, 2004
Posts: 1785
Usually it is the query failing for some reason.
in modules/Your_Account/index.php
You should have a line like
Code:
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_avatar_type, user_regdate, user_lang) VALUES (NULL, '".$row['username']."', '".$row['user_email']."', '$user_password', 'gallery/blank.gif', '3', '".$row['user_regdate']."', '$language')");
After that, put
Code:
echo "INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_avatar_type, user_regdate, user_lang) VALUES (NULL, '".$row['username']."', '".$row['user_email']."', '$user_password', 'gallery/blank.gif', '3', '".$row['user_regdate']."', '$language')";
When you go to activate, it should return the entire query to the browser. Then you can copy into phpMyAdmin and see what the error is
Posted: Thu Apr 27, 2006 3:06 pm
LupinOne
Resource Newbie
Joined: Apr 11, 2005
Posts: 29
Ran the code as you directed and got this result:
Code:
MySQL said:
Duplicate entry '2147483647' for key 1
I double checked the nuke_users table and yes, there was someone with that userid there.
One thing to keep in mind is we imported a phpBB forum with the import routine of yours. Incase you want it, here's the structure of the users table.
Code: CREATE TABLE nuke_users (
user_id int(11) NOT NULL auto_increment,
name varchar(60) NOT NULL default '',
username varchar(25) NOT NULL default '',
user_email varchar(255) NOT NULL default '',
femail varchar(255) NOT NULL default '',
user_website varchar(255) NOT NULL default '',
user_avatar varchar(255) NOT NULL default '',
user_regdate varchar(20) NOT NULL default '',
user_icq varchar(15) default NULL,
user_occ varchar(100) default NULL,
user_from varchar(100) default NULL,
user_interests varchar(150) NOT NULL default '',
user_sig varchar(255) default NULL,
user_viewemail tinyint(2) default NULL,
user_theme int(3) default NULL,
user_aim varchar(18) default NULL,
user_yim varchar(25) default NULL,
user_msnm varchar(25) default NULL,
user_password varchar(40) NOT NULL default '',
storynum tinyint(4) NOT NULL default '10',
umode varchar(10) NOT NULL default '',
uorder tinyint(1) NOT NULL default '0',
thold tinyint(1) NOT NULL default '0',
noscore tinyint(1) NOT NULL default '0',
bio tinytext NOT NULL,
ublockon tinyint(1) NOT NULL default '0',
ublock tinytext NOT NULL,
theme varchar(255) NOT NULL default '',
commentmax int(11) NOT NULL default '4096',
counter int(11) NOT NULL default '0',
newsletter int(1) NOT NULL default '0',
user_posts int(10) NOT NULL default '0',
user_attachsig int(2) NOT NULL default '0',
user_rank int(10) NOT NULL default '0',
user_level int(10) NOT NULL default '1',
broadcast tinyint(1) NOT NULL default '1',
popmeson tinyint(1) NOT NULL default '0',
user_active tinyint(1) default '1',
user_session_time int(11) NOT NULL default '0',
user_session_page smallint(5) NOT NULL default '0',
user_lastvisit int(11) NOT NULL default '0',
user_timezone tinyint(4) NOT NULL default '10',
user_style tinyint(4) default NULL,
user_lang varchar(255) NOT NULL default 'english',
user_dateformat varchar(14) NOT NULL default 'D M d, Y g:i a',
user_new_privmsg smallint(5) unsigned NOT NULL default '0',
user_unread_privmsg smallint(5) unsigned NOT NULL default '0',
user_last_privmsg int(11) NOT NULL default '0',
user_emailtime int(11) default NULL,
user_allowhtml tinyint(1) default '1',
user_allowbbcode tinyint(1) default '1',
user_allowsmile tinyint(1) default '1',
user_allowavatar tinyint(1) NOT NULL default '1',
user_allow_pm tinyint(1) NOT NULL default '1',
user_allow_viewonline tinyint(1) NOT NULL default '1',
user_notify tinyint(1) NOT NULL default '0',
user_notify_pm tinyint(1) NOT NULL default '0',
user_popup_pm tinyint(1) NOT NULL default '0',
user_avatar_type tinyint(4) NOT NULL default '3',
user_sig_bbcode_uid varchar(10) default NULL,
user_actkey varchar(32) default NULL,
user_newpasswd varchar(32) default NULL,
points int(10) default '0',
last_ip varchar(15) NOT NULL default '0',
karma tinyint(1) default '0',
user_login_tries smallint(5) unsigned NOT NULL default '0',
user_last_login_try int(11) NOT NULL default '0',
PRIMARY KEY (user_id),
KEY uid (user_id),
KEY uname (username),
KEY user_session_time (user_session_time),
KEY karma (karma)
) TYPE=MyISAM;
Posted: Thu Apr 27, 2006 4:03 pm
LupinOne
Resource Newbie
Joined: Apr 11, 2005
Posts: 29
Ok issue resolved. Here is what we found.
1. Somewhere in the import process (maybe before) the anonymous userid was set to -1. That hosed the auto increment system so anyone who registerd got the "max value" since the incrementer didn't have a start point. Data increment won't work right with negative values in autoincrement. This webserver is using 3.23.58 MySql (patched to fix all the security issues).
2. To help things along we set the user_id to 32bit [int(32)], unsigned, autocompact, and changed the anonymous user_id to 0.
Things are all happy now.
Thanks for all of your help!
Posted: Thu Apr 27, 2006 4:53 pm
Evaders99
Resource Master
Joined: May 25, 2004
Posts: 1785
Weird, I'm sure it should have set the anonymous user to 1. I'll check it out again
NukeResources Forum Index -> Bug Reports
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
All times are GMT - 4 Hours
Page 1 of 1