PDA

View Full Version : Database error - unsure what it's related to


Kung!
04-26-2014, 11:59 PM
I'll state up front that I did a bit of searching around; so if I missed something, my profuse apologies.

A while back our site got infected with malware. We finally got it fully cleaned, and in the process of that we updated our site from 4.1.10 PL3 (or something - I forget just now lol) to 4.2.2 PL1.

I've got most of the kinks ironed out, but while I can access EVERY other page of the site, the main index gives me a database error:

Database error in vBulletin 4.2.2:

Invalid SQL:

SELECT connections.*,rooms.*,user.*
FROM connections as connections
LEFT JOIN rooms as rooms ON connections.roomid = rooms.id
LEFT JOIN user as user ON connections.userid = user.userid
WHERE connections.userid > 0 AND connections.ip != '0.0.0.0'
AND connections.updated > DATE_SUB(NOW(),INTERVAL 60 SECOND)
ORDER BY start;

MySQL Error : Table '(our database).connections' doesn't exist

By looking at it, it seems like it's related to some sort of chat room, but I'm unsure. Can anyone point me in the right direction? Help would be much appreciated. :)

Zachery
04-27-2014, 12:00 AM
That's not a default query, its from one of your third party addons.

Kung!
04-27-2014, 12:07 AM
It just hit me that FlashChat is still supposedly installed on that site...which would explain it.

Here comes what may be a supremely stupid question but I gotta ask: Could fixing it be as simple as uninstalling the addon? LOL (I say that because it's never that easy, it seems like.)

Zachery
04-27-2014, 12:09 AM
uninstalling or disabling would do it.

Kung!
04-27-2014, 12:18 AM
Well, I uninstalled it, and....no dice. Same error. LOL

That said, I would assume that there's some code that needs to be removed, unless I'm missing something.

ForceHSS
04-27-2014, 12:27 AM
And did you remove all files from ftp and if any custom coding came with it reverted the templates

Kung!
04-27-2014, 12:31 AM
I'm just now coming to that conclusion. I did indeed revert the templates, but it's still happening, obviously.

So far it looks like it's only happening on the main index page, and when I click 'Mark forums read' in the Activity Stream.

This said, it's been a while (like 2 years) since I've had to manually edit any templates...so I'm having a bit of a hard time figuring out specifically what needs editing. It seems that there's code in whatever files are used to display the main index page that refers to the third party hack that needs to be removed.

tpearl5
04-27-2014, 12:40 AM
It could just be a spider accessing an old php script that calls that query. Did you delete the files associated with the mod?

Kung!
04-27-2014, 01:09 AM
Well, that's the problem...I've been searching around trying to find all the files associated with the mod, and figure out the changes it made/makes, but as of yet have been unsuccessful.

tpearl5
04-27-2014, 01:48 AM
it will be in the error message under referral

Kung!
04-27-2014, 05:56 PM
Referrer? I have this:

MySQL Error : Table '(ourdb).connections' doesn't exist
Error Number : 1146
Request Date : Sunday, April 27th 2014 @ 02:54:14 PM
Error Date : Sunday, April 27th 2014 @ 02:54:14 PM
Script : http://(site IP)/forum.php
Referrer : http://(site IP)/activity.php

cellarius
04-27-2014, 06:02 PM
Yeah, well, the last line does give you to referrer, does it not? activity.php is the activity-stream.

Kung!
04-27-2014, 06:14 PM
And that's what I'm confused about. The activity.php page comes up fine; the forum.php page does not.

In other words, I'm not sure which of those pages needs edited, and/or which templates. I SWEAR I'm not trying to be difficult...I just haven't ever been the best when it comes to coding. I have to learn the hard way (via trial and error). LOL

--------------- Added 1398627535 at 1398627535 ---------------

It gets better. ROFL

So I figured that it would be a good idea (and this is backed up elsewhere) to uninstall any addons to make sure it's not a third party issue.

Soon as I uninstalled Panjo...now ALL pages give me a DB error.

*facepalm*

cellarius
04-27-2014, 06:44 PM
Why on earth would you UNINSTALL all addons? That's what deactivating is for! And when uninstalling, did you make sure you also removed every single file that came with those addons?

BTW, you can be pretty sore Panjo is not to blame. Panjo comes preinstalled with vB.

Kung!
04-27-2014, 06:48 PM
Why on earth would you UNINSTALL all addons?

Because numerous how-to's reference disabling OR uninstalling all add-ons in the course of troubleshooting issues. Obviously I'll be a LITTLE more careful before uninstalling in the future. LOL

That's what deactivating is for! And when uninstalling, did you make sure you also removed every single file that came with those addons?


I've done that with the other mods that got uninstalled; was/am just about to do that with Panjo.

BTW, you can be pretty sore Panjo is not to blame. Panjo comes preinstalled with vB.

I'd agree in general; all I know is that I get DB errors on all site pages soon as the plugin was removed.