|
Username
|
Post: Database Error.
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-12-08 02:49 PM - Post#77943
Ok, I was having trouble installing fusion (see this thread: hthttp://www.fusionbb.com/forum/showtopi... )
But I managed to tweak the db inserts to get around the problems. So now I have the forums installed, but the database issue still remains.
Now I can not login to the forums do to the database issue. You can take a look here to see what I mean:
http://gammill.net/forum/index.php?
The Mysql error I am encountering now is:
Code:
Invalid QueryFile: D:\web\gammill.net\forum\includes\common.php
Line: 3075
SQL Error: Data too long for column 'session_user_agent' at row 1
SQL Error #: 1406
SQL Query: REPLACE INTO fbb_sessions (session_id, session_time, user_id, session_ip, session_site_auth, session_forum_auth, session_forum_visit, session_mod_forums, session_user_loc, session_username, session_user_prefs, session_cp_auth, session_track_vars, session_cp_authenticated, session_http_via, session_referer, session_user_agent, session_total_pt, session_unread_pt, session_visible, session_details, session_become_id, session_become_name, session_group_flag, session_name_color) VALUES ('0e5a0df0c16ac74d84628c095c61e814', '1215887828', '0', '207.195.73.30', 'a:4:{s:15:"CAN_SEE_PROFILE"; s:0:""; s:19:"CAN_SEE_POST_COUNTS"; s:0:""; s:20:"CAN_HAVE_LARGE_POSTS"; s:2:"30"; s:18:"START_WITH_BOOLEAN"; s:0:""; }', 'a:2:{s:13:"CAN_SEE_FORUM"; a:2:{i:1; s:0:""; i:2; s:0:""; }s:14:"CAN_USE_MARKUP"; a:2:{i:1; s:0:""; i:2; s:0:""; }}', 'a:0:{}', 'a:0:{}', '', '', 'a:34:{s:14:"info_is_banned"; i:0; s:15:"info_topics_per"; s:2:"20"; s:16:"info_replies_per"; s:2:"20"; s:17:"info_display_name"; s:9:"Anonymous"; s:14:"info_hide_help"; i:0; s:16:"info_forum_faves"; s:0:""; s:13:"info_forum_id"; s:0:""; s:14:"info_hide_sigs"; i:0; s:15:"info_group_flag"; s:0:""; s:15:"info_name_color"; s:0:""; s:15:"info_login_time"; s:0:""; s:13:"info_login_ip"; s:0:""; s:15:"info_login_host"; s:0:""; s:13:"info_timezone"; s:4:"-6.0"; s:15:"info_dateformat"; s:5:"m-d-y"; s:15:"info_timeformat"; s:5:"h:i A"; s:17:"info_hide_avatars"; i:0; s:13:"info_userskin"; s:18:"always.use.default"; s:17:"info_usertemplate"; s:18:"always.use.default"; s:13:"info_language"; s:7:"english"; s:12:"info_visible"; i:1; s:20:"info_visible_details"; i:1; s:12:"info_sidebar"; s:1:"2"; s:13:"info_euro_cal"; s:1:"0"; s:14:"info_shout_ref"; i:0; s:18:"info_view_threaded"; i:0; s:18:"info_redirect_time"; i:0; s:13:"info_autojump"; i:0; s:16:"info_ignored_uid"; s:0:""; s:18:"info_clear_flasher"; i:0; s:12:"info_preview"; i:0; s:19:"info_inline_preview"; i:0; s:14:"info_favorites"; s:0:""; s:13:"info_attitude"; s:0:""; }', 'a:0:{}', 'a:0:{}', '0', '', 'http://gammill.net/forum/cp_login.php', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)', '0', '0', '1', '1', '', '', '', '')
I am going to assume that even if this one gets squashed more will pop up.
The server is running:
MySQL client version: 5.0.51a
PHP Version 5.2.6
It is running on a windows box.
phpinfo : http://gammill.net/phpinfo.php
Is anyone running fusion on the 5.0.51a release of mysql?
Any help or suggestions would be great. It would be nice to know if this issue is just localied to this server, or if there is a compatibilty issue with the latest version of mysql.
|
greg
FusionBB Fanatic
Posts 4956
|
07-12-08 05:25 PM - Post#77945
Even with your DB errors, the forum seems to be working. I was able to register and got the verification email just fine. If you get an approval request it's from me. Not sure why the errors though.
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-12-08 05:32 PM - Post#77946
can you log in?
I cant seem to log in with the admin account.
|
greg
FusionBB Fanatic
Posts 4956
|
07-12-08 07:03 PM - Post#77947
I haven't seen an approval yet, but like I said, I got onto the site and was able to register without any problems. It was showing a little "database error" message at the top of the screen.
|
greg
FusionBB Fanatic
Posts 4956
|
07-12-08 07:04 PM - Post#77948
Nope, can't log in, but that may be due to the account needing approval first, at least that is what the message said when I registered.
|
JoshPet
FusionBB Developer
Posts 6722
|
07-12-08 10:40 PM - Post#77955
Hey Try dropping the fbb_sessions table, then run this query to recreate it.
Code:
CREATE TABLE IF NOT EXISTS `fbb_sessions` (
`session_id` varchar(64) NOT NULL default '',
`session_time` int(11) unsigned NOT NULL default '0',
`user_id` mediumint(8) unsigned NOT NULL default '0',
`session_visible` tinyint(1) NOT NULL default '1',
`session_details` tinyint(1) NOT NULL default '1',
`session_username` varchar(100) default NULL,
`session_ip` varchar(15) default NULL,
`session_track_vars` text,
`session_site_auth` text,
`session_forum_auth` mediumtext,
`session_mod_forums` text,
`session_post_array` text,
`session_error_array` text,
`session_user_loc` varchar(255) default NULL,
`session_forum_name` varchar(255) default NULL,
`session_forum_id` mediumint(8) default NULL,
`session_topic_name` varchar(255) default NULL,
`session_topic_id` mediumint(8) default NULL,
`session_user_prefs` text NOT NULL,
`session_cp_auth` text NOT NULL,
`session_cp_authenticated` tinyint(1) unsigned NOT NULL default '0',
`session_http_via` varchar(100) default NULL,
`session_referer` varchar(150) default NULL,
`session_user_agent` varchar(100) default NULL,
`session_total_pt` smallint(4) unsigned NOT NULL default '0',
`session_unread_pt` smallint(4) unsigned NOT NULL default '0',
`session_forum_visit` text,
`session_topic_visit` text,
`session_become_id` mediumint(8) unsigned NOT NULL default '0',
`session_become_name` varchar(100) default NULL,
`session_group_flag` varchar(30) NOT NULL default '',
`session_name_color` varchar(15) default NULL,
PRIMARY KEY (`session_id`,`session_time`),
KEY `user_id_index` (`user_id`,`session_visible`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Feel Better, Feel Younger, Sleep Better - Trans-D Tropin
Visit www.BuyTransD.com - use coupon code 1004 to save $20 |
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 11:30 AM - Post#77959
did that, same problem. The info that is being put into session_user_agent is 113 characters long.
Going to increase the size of that feild to 150 and see what happens.
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 11:31 AM - Post#77960
ok, after incrasing the varchar to 150 for the session_user_agent field, i now get this error:
Code:
Invalid QueryFile: D:\web\gammill.net\forum\includes\common.php
Line: 3075
SQL Error: Incorrect integer value: '' for column 'session_become_id' at row 1
SQL Error #: 1366
SQL Query: REPLACE INTO fbb_sessions (session_id, session_time, user_id, session_ip, session_site_auth, session_forum_auth, session_forum_visit, session_mod_forums, session_user_loc, session_username, session_user_prefs, session_cp_auth, session_track_vars, session_cp_authenticated, session_http_via, session_referer, session_user_agent, session_total_pt, session_unread_pt, session_visible, session_details, session_become_id, session_become_name, session_group_flag, session_name_color) VALUES ('12297d00f8b97711325757fbfa0f8801', '1215963301', '0', '207.195.73.30', 'a:4:{s:15:"CAN_SEE_PROFILE"; s:0:""; s:19:"CAN_SEE_POST_COUNTS"; s:0:""; s:20:"CAN_HAVE_LARGE_POSTS"; s:2:"30"; s:18:"START_WITH_BOOLEAN"; s:0:""; }', 'a:0:{}', 'a:0:{}', 'a:0:{}', '', '', 'a:34:{s:14:"info_is_banned"; i:0; s:15:"info_topics_per"; s:2:"20"; s:16:"info_replies_per"; s:2:"20"; s:17:"info_display_name"; s:9:"Anonymous"; s:14:"info_hide_help"; i:0; s:16:"info_forum_faves"; s:0:""; s:13:"info_forum_id"; s:0:""; s:14:"info_hide_sigs"; i:0; s:15:"info_group_flag"; s:0:""; s:15:"info_name_color"; s:0:""; s:15:"info_login_time"; s:0:""; s:13:"info_login_ip"; s:0:""; s:15:"info_login_host"; s:0:""; s:13:"info_timezone"; s:4:"-6.0"; s:15:"info_dateformat"; s:5:"m-d-y"; s:15:"info_timeformat"; s:5:"h:i A"; s:17:"info_hide_avatars"; i:0; s:13:"info_userskin"; s:18:"always.use.default"; s:17:"info_usertemplate"; s:18:"always.use.default"; s:13:"info_language"; s:7:"english"; s:12:"info_visible"; i:1; s:20:"info_visible_details"; i:1; s:12:"info_sidebar"; s:1:"2"; s:13:"info_euro_cal"; s:1:"0"; s:14:"info_shout_ref"; i:0; s:18:"info_view_threaded"; i:0; s:18:"info_redirect_time"; i:0; s:13:"info_autojump"; i:0; s:16:"info_ignored_uid"; s:0:""; s:18:"info_clear_flasher"; i:0; s:12:"info_preview"; i:0; s:19:"info_inline_preview"; i:0; s:14:"info_favorites"; s:0:""; s:13:"info_attitude"; s:0:""; }', 'a:0:{}', 'a:0:{}', '0', '', '', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)', '0', '0', '1', '1', '', '', '', '')
|
JoshPet
FusionBB Developer
Posts 6722
|
07-13-08 05:28 PM - Post#77966
Wow - I'm not sure what to tell you - gotta be some odd MySQL configuration, not sure why MySQL wants an integer value? I did some google searching for the error thought.
The only thing I could find was an older MySQL bug in which it stated that if sql_mode='' instead of sql_mode=TRADITIONAL should allow those queries to be accepted. Setting TRADITIONAL requires everything to have a value in the query.
Now in theory, the query could be edited to include '0' instead of just a blank '', but there's thousands of queries in about 1700 scripts that would need to be adjusted. Based on what I've read, I'd say that MySQL is setup a little funky, with that configuration variable. See if you host can set sql_mode='' in MySQL configuration and that should solve it.

Feel Better, Feel Younger, Sleep Better - Trans-D Tropin
Visit www.BuyTransD.com - use coupon code 1004 to save $20 |
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 10:03 PM - Post#77972
hmmm, I figured that something like that would be the case, I just assumed it was the version of mysql was the culpret.
Looking in the sql configuration report (from phpmyadmin.) I see this line.
sql mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
would the STRICT_TRANS_TABLES value be whats causing the issues. Something tells me that it is.
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 10:06 PM - Post#77973
STRICT_TRANS_TABLES
If a value could not be inserted as given into a transactional table, abort the statement. For a non-transactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement. More detail is given later in this section. (Implemented in MySQL 5.0.2)
(from mysql.com)
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 10:26 PM - Post#77974
Well you were right, the problem did indeed lie with the mysql set up. I removed the mode in question (it seems the server admin gave me super access to the mysql server, since i can change the mysql variables with a sql command) and it seems to be working like a charm.
|
JoshPet
FusionBB Developer
Posts 6722
|
07-13-08 11:30 PM - Post#77975
Awesome! This one honestly had me stumped, I had never heard of this before, and I've been doing this a long time. Glad you found and were able to modify this!

Feel Better, Feel Younger, Sleep Better - Trans-D Tropin
Visit www.BuyTransD.com - use coupon code 1004 to save $20 |
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-13-08 11:36 PM - Post#77976
ya had me scratching my head. It seems that in mysql 5 they added in a bunch of new mysql modes. I dont know what the default ones are when you install mysql 5, but I wish i would have figured this out sooner...
O well live and learn
|
VertexBilly
FusionBB Addict
Posts 875
|
07-14-08 12:00 AM - Post#77977
With the linux distros we use and the common control panels we use at Vertex this MySQL mode is not the standard one as we have never had this issue.
I also recently did a default install of MySQL 5.x on a Win 2003 server and this was not the default mode so I would guess they either installed some bizarre package or someone got creative with the configuration.
Does this server run a panel? If so which, out of curiosity?
Billy Cooter
Managing Partner, VertexHost.com
|
|
Codebenders
FusionBB Enthusiast
Posts 281
|
07-14-08 12:05 AM - Post#77978
I have no idea, as I have not been given any access to a panel, nor have I been told anything about one.
I wish I had access as that would make my job easier on some things, but I am just a subcontractor on this site. so I dont get included in the loop on some things.
|