vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Registration dbase error (https://vborg.vbsupport.ru/showthread.php?t=54861)

DiscussAnything 06-29-2003 08:06 PM

Registration dbase error
 
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:

Quote:

<!-- 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?

PHP Code:

SHOW FIELDS from useractivation 


Lesane 06-29-2003 09:55 PM

Nevermind, i already see it.

The error:
PHP Code:

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

Quote:

Today at 12:59 AM DiscussAnything said this in Post #9
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

PHP Code:

    //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

PHP Code:

//save to DB
    
$DB_site->query("
        INSERT INTO useractivation
            (useractivationid, userid, dateline, activationid, type, usergroupid)
        VALUES
            (NULL, 
$userid, ".time().", '$activateid', 0, " iif($newusergroupid == 442) . ")
    "
);

    eval(
"\$message = \"".gettemplate("email_activateaccount",1,0)."\";");
    eval(
"\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";");

    
vbmail($email$subject$message);

  } 

My current one is:

PHP Code:

//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 :)


All times are GMT. The time now is 04:21 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01928 seconds
  • Memory Usage 1,761KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete