Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 10-26-2006, 01:49 PM
jwashburn jwashburn is offline
 
Join Date: Apr 2006
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I clean out a hack

I am running the psitats hack and for whatever reason I lost the two tables that the hack requires to run. So i get this error

Code:
Database error in vBulletin 3.6.2:

Invalid SQL:

		REPLACE INTO `psistats_cache` (`cdata`, `ctype`, `csid`)
		VALUES ('64.50.53.162', 'country', '64.50.53.162_country'), ('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)', 'useragent', '64.50.53.162_useragent');

MySQL Error  : Can't find file: 'psistats_cache.MYI' (errno: 2)
Error Number : 1017
Date         : Thursday, October 26th 2006 @ 10:43:51 AM
I also cant get into ADMINCP at all

So I looked at the XML file to see the database mods it made and it looks that it creates a couple of tables.

Here is the code from that

Code:
// DROP OLD TABLES
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_browser`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_country`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_os`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_referrer`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_screendepth`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_screenresolution`");

// CREATE TABLES
$db->query_write("CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX . "psistats_cache` (
	`cdata` varchar(255) NOT NULL default '',
	`ctype` varchar(40) NOT NULL default '',
	`csid` varchar(255) NOT NULL default '',
	UNIQUE KEY `csid` (`csid`)) TYPE=MyISAM
");

$db->query_write("CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX . "psistats_data` (
	`cdata` varchar(100) NOT NULL default '',
	`count` int(10) unsigned NOT NULL default '0',
	`ctype` varchar(40) NOT NULL default '',
	`cmisc` varchar(40) NOT NULL default '',
	KEY `ctype` (`ctype`)) TYPE=MyISAM
");

// CREATE CRON ON PRE-3.6.0 VBULLETIN
if (is_newer_version('3.6.0', $vbulletin->options['templateversion']))
{
	$db->query_write("DELETE FROM `" . TABLE_PREFIX  ."cron` WHERE `filename` LIKE '%psistats_update.php%' LIMIT 1");
	$db->query_write("INSERT INTO `" . TABLE_PREFIX . "cron` VALUES (NULL, 1136665500, -1, -1, -1, 'a:1:{i:0;i:25;}', './includes/cron/psistats_update.php', 1, 'psiStats 2006 Update (15-Minute Interval)')");
}

$db->show_errors();]]></installcode>
			<uninstallcode><![CDATA[$db->hide_errors();

// DROP TABLES
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_browser`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_country`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_os`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_referrer`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_screendepth`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_screenresolution`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_cache`");
$db->query_write("DROP TABLE IF EXISTS `" . TABLE_PREFIX . "psistats_data`");

// ERASE CRON
$db->query_write("DELETE FROM `" . TABLE_PREFIX  ."cron` WHERE `filename` LIKE '%psistats_update.php%' LIMIT 1");
So I manuall made the two tables psistats_cache and psistats_data

I got no changes. I thought maybe there was a permissions issue so I inserted some data into those tables with phpmyadmin and it worked ok.

So I am at the point of reisntalling vb from scratch and i dont want to do that.

I have tried disabling hooks in my config.php but then I have a problem with a php adsnew integration that I did. IN order to get around that error I have to remove references to that in my templates, the problem is I cant get to my templates.

So if anyone knows how to reset my default template without admincp access, I can start down that road.

My main question is how do I remove this hack manually. Obviously just removing the two tables isnt going to do it, there must me some reference to it somehere else.

We have been down for 2 days now. Any help would be appreciated
Reply With Quote
  #2  
Old 11-26-2006, 03:04 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why don't you post problems related to a particular hack in that hack's thread?

To disable hacks on your site, add the following code to your config.php:
define('DISABLE_HOOKS', true);

Then uninstall whatever hack you want to uninstall. But to fix the problem, you would simply need to re-import the product xml of psistats.
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 12:48 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.03384 seconds
  • Memory Usage 2,177KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete