View Full Version : Registration dbase error
DiscussAnything
06-29-2003, 08:06 PM
When I turn email-verification (user needs to activate upon receiving email) on, after hitting submit on a registration, a database error shows. If i disable it, everything works fine. I did do a number of hacks but everything else works fine so I doubt it is directly related.
Is there anything specific I should be looking at?
thx
Lesane
06-29-2003, 08:19 PM
Well, what's the error?
DiscussAnything
06-29-2003, 08:26 PM
it doesnt say, it just says 'Oops, it seems there has been a slighter error'...
Lesane
06-29-2003, 08:46 PM
Look at the source when you see that error
DiscussAnything
06-29-2003, 09:15 PM
It's this:
<!-- Database error in vBulletin 2.3.0:
Invalid SQL: INSERT INTO useractivation VALUES (NULL,'11','1056925402','84189185',0)
mysql error: Column count doesn't match value count at row 1
mysql error number: 1136
Lesane
06-29-2003, 09:47 PM
Could you execute this query below and post the results here?
SHOW FIELDS from useractivation
Lesane
06-29-2003, 09:55 PM
Nevermind, i already see it.
The error:
INSERT INTO useractivation VALUES (NULL,'11','1056925402','84189185',0)
shows us that it has 5 fields while it should contain 6 fields (originally in 2.3.0).
And you are using 2.3.0, so i guess that there is a hack for <2.3.0 and that you changed some lines in it wich aren't compatible with 2.3.0. If you did not made any changes in root/register.php then i'd suggest you to re-upload the original root/register.php from 2.3.0.
DiscussAnything
06-29-2003, 09:58 PM
The fields for that table are:
useractivationid
userid
dateline
activationid
type
usergroupid
DiscussAnything
06-29-2003, 09:59 PM
i actually did try it with the original, but that didn't work. I'll go over the hacks I did that use register.php and/or that table and see if I missed out on a field.
thanks for the help. For now I just have the email-activation disabled...
Which 6 are there supposed to be in 2.3.0 ?
Lesane
06-29-2003, 10:01 PM
I can give a look at it if you want, just pm me with the file.
Lesane
06-29-2003, 10:02 PM
Today at 12:59 AM DiscussAnything said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=414015#post414015)
Which 6 are there supposed to be in 2.3.0 ?
The 6 fields wich you have are fine. It's the line in register.php that causes the error!
DiscussAnything
06-29-2003, 10:04 PM
this is the register.php bit about it
//save to DB
$DB_site->query("INSERT INTO useractivation VALUES (NULL,'$userid','".time()."','$activateid',0)");
if I add ,3 after the zero, making it default to 'awaiting confirmation', would that work??
Lesane
06-29-2003, 10:07 PM
It would work yes but not 100% because there is also a usergroup called '(COPPA) Users Awaiting Moderation' wich is benifical here. ;)
DiscussAnything
06-29-2003, 10:13 PM
The original is
//save to DB
$DB_site->query("
INSERT INTO useractivation
(useractivationid, userid, dateline, activationid, type, usergroupid)
VALUES
(NULL, $userid, ".time().", '$activateid', 0, " . iif($newusergroupid == 4, 4, 2) . ")
");
eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");
vbmail($email, $subject, $message);
}
My current one is:
//save to DB
$DB_site->query("INSERT INTO useractivation VALUES (NULL,'$userid','".time()."','$activateid',0)");
eval("\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
eval("\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");
mail ($email,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
}
I dont think Ive changed this, although I'll go over the hacks again. Still weird though that a whole section disappeared... I think I'll just reset it to what it's supposed to be and see if that works
Lesane
06-29-2003, 10:14 PM
It's changed. :lick:
If you change those current lines with the original then you are done.
DiscussAnything
06-29-2003, 10:19 PM
i'll give it a shot. At least now I have an idea where to look, I wouldnt have found this by myself. Thanks for the help, I appreciate it :)
Lesane
06-29-2003, 10:20 PM
You're Welcome :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.