 |
SpellingCow.com
Improving forum spelling since... well not very long
|
| View previous topic :: View next topic |
| Author |
Message |
DMon
Joined: 07 Mar 2005 Posts: 1
|
Posted: Mon Mar 07, 2005 10:13 pm Post subject: Could not insert data into users table (registering error) |
|
|
Ok, so I installed spelling cow and it works fine in the forums, but when people click the link to register, I get the following error:
| Quote: | Could not insert data into users table
DEBUG MODE
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_autospell, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_wordwrap,user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (11, 'Hovac', 1110251167, 'e10adc3949ba59abbe56e057f20f883e', 'nobody@aol.com', '', '', '', '', '', '', '', '', 0, 1, '', '', '', 1, 1, 1, 1, 1, 1, 0, 1, 1, -5, 'D M d, Y g:i a', '70', 'english', 1, 0, 1, 1, '')
Line : 690
File : usercp_register.php |
Here are lines 670 to 707
| Code: | //
// Get current date
//
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_autospell, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_wordwrap,user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $spellcheck, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_wordwrap). "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{
$user_actkey = gen_rand_string(true);
$key_len = 54 - (strlen($server_url));
$key_len = ( $key_len > 6 ) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
$sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
}
else
{
$sql .= "1, '')";
}
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
}
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
VALUES ('', 'Personal User', 1, 0)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql);
}
$group_id = $db->sql_nextid();
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($user_id, $group_id, 0)";
if( !($result = $db->sql_query($sql, END_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql);
} |
How can I fix this? |
|
| Back to top |
|
 |
nuttzy99 Site Admin

Joined: 23 May 2004 Posts: 1068
|
Posted: Wed Mar 09, 2005 10:17 am Post subject: |
|
|
Sounds like you didn't perform the database alteration:
ALTER TABLE `phpbb_users` ADD `user_autospell` TINYINT( 1 ) DEFAULT '1';
-Nuttzy  _________________ <?php echo "something wicked awesome for my sig"; ?> |
|
| Back to top |
|
 |
jimbaum
Joined: 08 Oct 2005 Posts: 6
|
Posted: Mon Oct 10, 2005 2:12 pm Post subject: How do I "alter table" using phpmyadmin? |
|
|
| nuttzy99 wrote: | Sounds like you didn't perform the database alteration:
ALTER TABLE `phpbb_users` ADD `user_autospell` TINYINT( 1 ) DEFAULT '1';
-Nuttzy  |
I would be very grateful if you could tell me how to do this step using phpmyadmin.
Thanks,
Jim B. |
|
| Back to top |
|
 |
madogs
Joined: 21 Oct 2005 Posts: 5 Location: Richmond, IN
|
Posted: Sat Oct 22, 2005 3:01 am Post subject: Just figured out how I fix the same bug... |
|
|
I'm a total noob with all of this stuff, but perhaps you'll be able to fix it if you do what I did (tons of thanks to "greatness" at the phpbb forums if you're out there):
Basically - due to my noobitued - I didn't understand this part of the installation instructions:
| Quote: | -----[ SQL ]---------------------------------
#
# NOTE: if you don't want the checker to be on by default, change "DEFAULT '1';" to "DEFAULT '0';"
#
ALTER TABLE `phpbb_users` ADD `user_autospell` TINYINT( 1 ) DEFAULT '1'; |
So this is one way to do this:
Install phpmyadmin (go to the website http://www.phpmyadmin.net/home_page/index.php and follow the 'downloads' links) - it is a mySQL administrator. I can access it from my host's page so I can't give you details on how to install it.
Once you have accessed phpmyadmin for your website open the database that your bulletin board is located on (it is listed in the drop-down menu in the left frame).
A table will appear in the right frame with a list of all of the tables associated with your board. On this table you'll find 'phpbb_users' listed near the bottom. Select the check box and then click the icon that says 'structure.'
Scroll down on the page, just below the large table it says 'Add 1 field(s).' Click the 'Go' button to the right of that.
Under 'Field' type 'user_autospell'; under 'Type' select TINYINT; under 'Length/Values*' type '1'; under 'Null' select 'Null'; under 'Default' type '1' (don't enter the quotes in these fields). Click the 'Save' button at the bottom. When I entered it incorrectly the first time phpmyadmin gave me an error message. When I entered it correctly there was a box at the top of the page that said exactly what was written in the Spelling Cow instructions:
| Quote: | | ALTER TABLE `phpbb_users` ADD `user_autospell` TINYINT( 1 ) DEFAULT '1'; |
Well, hopefully this information is helpful to someone.
-Margaret _________________ -Margaret |
|
| Back to top |
|
 |
jimbaum
Joined: 08 Oct 2005 Posts: 6
|
Posted: Sat Oct 22, 2005 9:50 am Post subject: |
|
|
Very good, thank you. I actually was able to randomly work my way through it, but you've documented it for others. Way to go!
Jim B. |
|
| Back to top |
|
 |
FragInc
Joined: 11 Jun 2006 Posts: 2
|
Posted: Mon Jun 12, 2006 1:16 am Post subject: |
|
|
| The "Null/Not Null" was missing in the instructions. |
|
| Back to top |
|
 |
|
|
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
|
Sponsors:
Identity Theft Protection - Compare identity theft protection services
Structured Settlements - cash for structured settlements, sell annuity, lottery winnings, and more.
Barcode Scanner Manufacturer - taiwan manufacturer of scanners, swipe card reader, serial-ethernet converter, cash drawer, and other pos devices.
Advice, help & demonstrations for sign makers - Europe's leading sign makers website
Tattoo - we are a group of tattoo enthusiasts
|