Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2013, 05:49 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Query to Restore vb_session Table

Is this the correct query to restore the vb_session table on vB 3.8.5?

[sql]CREATE vb_session (
sessionhash CHAR(32) NOT NULL DEFAULT '',
userid INT UNSIGNED NOT NULL DEFAULT '0',
host CHAR(15) NOT NULL DEFAULT '',
idhash CHAR(32) NOT NULL DEFAULT '',
lastactivity INT UNSIGNED NOT NULL DEFAULT '0',
location CHAR(255) NOT NULL DEFAULT '',
useragent CHAR(100) NOT NULL DEFAULT '',
styleid SMALLINT UNSIGNED NOT NULL DEFAULT '0',
languageid SMALLINT UNSIGNED NOT NULL DEFAULT '0',
loggedin SMALLINT UNSIGNED NOT NULL DEFAULT '0',
inforum SMALLINT UNSIGNED NOT NULL DEFAULT '0',
inthread INT UNSIGNED NOT NULL DEFAULT '0',
incalendar SMALLINT UNSIGNED NOT NULL DEFAULT '0',
badlocation SMALLINT UNSIGNED NOT NULL DEFAULT '0',
bypass TINYINT NOT NULL DEFAULT '0',
profileupdate SMALLINT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (sessionhash)
);[/sql]

Yeah. I know. Missing table. Not good. :erm:
Reply With Quote
  #2  
Old 10-07-2013, 06:14 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought there was a way to get the sql printed out for the table structure but I couldn't find it. You can check it with this from vB3.7.3. It looks like you have to specify the number of chars for smallint and tinyint
Attached Images
File Type: png session.png (109.9 KB, 0 views)
Reply With Quote
  #3  
Old 10-08-2013, 12:26 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So more like...

[sql]CREATE vb_session (
sessionhash CHAR(32) NOT NULL DEFAULT '',
userid INT CHAR(10) NOT NULL DEFAULT '',
host CHAR(15) NOT NULL DEFAULT '',
idhash CHAR(32) NOT NULL DEFAULT '',
lastactivity INT CHAR(10) NOT NULL DEFAULT '',
location CHAR(255) NOT NULL DEFAULT '',
useragent CHAR(100) NOT NULL DEFAULT '',
styleid SMALLINT CHAR(5) NOT NULL DEFAULT '',
languageid SMALLINT CHAR(5) NOT NULL DEFAULT '',
loggedin SMALLINT CHAR(5) NOT NULL DEFAULT '',
inforum SMALLINT CHAR(5) NOT NULL DEFAULT '',
inthread INT CHAR(10) NOT NULL DEFAULT '',
incalendar SMALLINT CHAR(5) NOT NULL DEFAULT '',
badlocation SMALLINT CHAR(5) NOT NULL DEFAULT '',
bypass TINYINT CHAR(4) NOT NULL DEFAULT '',
profileupdate SMALLINT CHAR(5) NOT NULL DEFAULT '',
PRIMARY KEY (sessionhash)
);[/sql]

Or do I need to specify INT, too?

--------------- Added [DATE]1381196910[/DATE] at [TIME]1381196910[/TIME] ---------------

I went ahead and tried both of these. But nothing happens. No tables are created. No errors are thrown up. I've been stuck on this one all day.
Reply With Quote
  #4  
Old 10-08-2013, 01:11 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:
[sql]
CREATE TABLE vb_session (
sessionhash CHAR(32) NOT NULL DEFAULT '',
userid INT(10) NOT NULL DEFAULT '0',
host CHAR(15) NOT NULL DEFAULT '',
idhash CHAR(32) NOT NULL DEFAULT '',
lastactivity INT(10) NOT NULL DEFAULT '0',
location CHAR(255) NOT NULL DEFAULT '',
useragent CHAR(100) NOT NULL DEFAULT '',
styleid SMALLINT(5) NOT NULL DEFAULT '0',
languageid SMALLINT(5) NOT NULL DEFAULT '0',
loggedin SMALLINT(5) NOT NULL DEFAULT '0',
inforum SMALLINT(5) NOT NULL DEFAULT '0',
inthread INT(10) NOT NULL DEFAULT '0',
incalendar SMALLINT(5) NOT NULL DEFAULT '0',
badlocation SMALLINT(5) NOT NULL DEFAULT '0',
bypass TINYINT(4) NOT NULL DEFAULT '0',
profileupdate SMALLINT(5) NOT NULL DEFAULT '0',
PRIMARY KEY (sessionhash)
);
[/sql]

But there are a lot of people here a lot better than I am with sql.

Where are you doing this? In your admin CP? I would just do it with phpMyAdmin in cPanel.

EDIT: What happened to all those default values of '0'? Those should all be in there. I put them back in.
Reply With Quote
Благодарность от:
Digital Jedi
  #5  
Old 10-08-2013, 01:32 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried phpMyAdmin first. Then I tried to run the querys through tools.php, since I can't get the forum to load without vb_session. Sorry, I thought the 0s went out once you added the CHARS. That's what I get for guessing.

--------------- Added [DATE]1381199746[/DATE] at [TIME]1381199746[/TIME] ---------------

Quote:
Originally Posted by nerbert View Post
Try this:
[sql]
CREATE TABLE vb_session (
sessionhash CHAR(32) NOT NULL DEFAULT '',
userid INT(10) NOT NULL DEFAULT '0',
host CHAR(15) NOT NULL DEFAULT '',
idhash CHAR(32) NOT NULL DEFAULT '',
lastactivity INT(10) NOT NULL DEFAULT '0',
location CHAR(255) NOT NULL DEFAULT '',
useragent CHAR(100) NOT NULL DEFAULT '',
styleid SMALLINT(5) NOT NULL DEFAULT '0',
languageid SMALLINT(5) NOT NULL DEFAULT '0',
loggedin SMALLINT(5) NOT NULL DEFAULT '0',
inforum SMALLINT(5) NOT NULL DEFAULT '0',
inthread INT(10) NOT NULL DEFAULT '0',
incalendar SMALLINT(5) NOT NULL DEFAULT '0',
badlocation SMALLINT(5) NOT NULL DEFAULT '0',
bypass TINYINT(4) NOT NULL DEFAULT '0',
profileupdate SMALLINT(5) NOT NULL DEFAULT '0',
PRIMARY KEY (sessionhash)
);
[/sql]

But there are a lot of people here a lot better than I am with sql.

Where are you doing this? In your admin CP? I would just do it with phpMyAdmin in cPanel.

EDIT: What happened to all those default values of '0'? Those should all be in there. I put them back in.
Oh brother, I was running them through the wrong box in phpMyAdmin. <facepalm> Can you tell I don't know what I'm doing? This worked. Thanks!

But...

Yeah, I just now noticed that I'm missing more than vb_session. vb_user is gone, too. I hate SSL, but I'm going to see if I can run one of my last backups. It's probably not very current. But I seldom did them when my site started slowing down. Thanks again, though.
Reply With Quote
  #6  
Old 10-08-2013, 03:22 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can get any table creation query out of your mysql-schema.php file in the install dir for future reference.
Reply With Quote
Благодарность от:
Digital Jedi
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:09 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.03620 seconds
  • Memory Usage 2,238KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (2)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete