Go Back   vb.org Archive > Community Discussions > Forum and Server Management
  #1  
Old 07-22-2013, 11:27 AM
Wir3tap Wir3tap is offline
 
Join Date: Jul 2013
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default SQL Question

Ok, our vbulletin site recently got hacked, we have pretty much moved everything onto our new site. (New Forum and Database, Same Cpanel.)

Here is the tricky question.

Our Old Forum, the database is still fine and had the old userid's. When we imported into our new forum our userid's got completely changed. This messed up our awarded medals. We imported the awarded medals table but they are still linked to the old forums userid.

How can I make a sql query to do this?

Heres the info:
New Forum: _forumsv2
Old Forum: _tourny

Tables in Old Forum _tourny:
users - userid, and username are the 2 fields. (Only reason bringing into user id and name is to match up something for the new forum.)

Tables in New Forum _forumsv2:
users - userid, and username (Userid to get the new medals to use THIS ID instead of the Old userid in old forums. And Username which is the common connection between the 2.
award_user - userid (This still has the old user id's in and needs to be updated to reflect the new user id's. This is the only important field in this table.)

Please help!

Thanks!
Reply With Quote
  #2  
Old 07-22-2013, 03:21 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you did the export, something messed up. You should reexport.

You didn't use impex to move servers or something did you? That'd do what you're running into.


You should just be moving servers: http://www.vbulletin.com/docs/html/m...rsion=40200603
Reply With Quote
Благодарность от:
Simon Lloyd
  #3  
Old 07-22-2013, 04:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you importing the database instead of just moving over a copy of it?
Reply With Quote
  #4  
Old 07-22-2013, 06:03 PM
Wir3tap Wir3tap is offline
 
Join Date: Jul 2013
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We didn't know where the hack was that was the problem. So we created a new forums. Also the problem we had was the old vbulletin forums was provided to us by the hosting service we used. Since they changed owners our support ran out, and in that time we bought our own vbulletin license.

If I just made a duplicate copy of the database how many errors are going to pop up lol
Reply With Quote
  #5  
Old 07-22-2013, 08:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, if you made a duplicate copy of the database, then you wouldn't have userid issues. I'd say it is worth a try.
Reply With Quote
  #6  
Old 07-25-2013, 08:09 PM
Wir3tap Wir3tap is offline
 
Join Date: Jul 2013
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok tonight, I have tried to reinstall a vbulletin over it, Everytime the login screen comes up with the old database, after logging in I get the old hacked message. So it's something in our database, and just trying to get a script that might change UserID Numbers might be the easiest.
Reply With Quote
  #7  
Old 07-25-2013, 08:27 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you haven't already, try to disable plugins, by editing your includes/config.php and inserting this line:
Code:
define('DISABLE_HOOKS', 1);
near the top just under the <?php line. If that stops the message then the hack is in a plugin, and you can probably go to the plugin manager and figure out which one.


If that doesn't work, try downloading and running this: www.vbulletin.org/forum/showthread.php?t=281080
Reply With Quote
  #8  
Old 07-26-2013, 07:44 PM
Wir3tap Wir3tap is offline
 
Join Date: Jul 2013
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fix it just performed a miracle. Thank you very much!!!
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04152 seconds
  • Memory Usage 2,221KB
  • Queries Executed 11 (?)
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_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (1)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_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
  • 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