Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8
Author Message
mordain
Regular
Regular



Joined: Jul 08, 2006
Posts: 77

PostPosted: Thu Aug 17, 2006 8:59 pm Reply with quote

I just had to deal with a nightmare of a problem. Something damaged a number of tables that run the forums module. I was repairing them and afterwards, I optimized the database. Suddenly, no one could access the forums, it gave a Debug Mode error. I fixed the table it mentioned, and I checked on the tables again.

Not only were a lot of the table damaged, one said error. My host runs software that says the status of the tables, it goes OK - Warning - Error. I had never seen an error before. The tables I had been repairing before all had warning on them. I repaired the table, and people could access the forums, so I optimized again. Then, every time they tried to post or reply another Debug Mode error came up.

I fixed the table it mentioned, and things seem to work now. However, I noticed that a topic had mysteriously disappeared. Now here are my questions:

1. How does something like this happen? One problem just led to another. Could I have been hacked?

2. Is there a way to prevent this kind of thing in the future?

3. There are still some tables with a Warning status on them, but I dont want to touch them. What should I do about them?

4. What exactly does optimize do? Could it have somehow caused this problem?

5. There was a user who's majority of posts were made in the topic that disappeared, but when it went missing, his number of post stayed the same, telling me that the topic is floating around somewhere. Any ideas on this?
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Aug 18, 2006 6:58 am Reply with quote

Quote:

5. There was a user who's majority of posts were made in the topic that disappeared, but when it went missing, his number of post stayed the same, telling me that the topic is floating around somewhere. Any ideas on this?

I only have time right now to comment on this last point. The user's number of posts is stored on the nuke_users table, so your assumption is not correct. All his posts can be gone and still report the old post count.

Hopefully someone else will pick up your other questions... sorry...

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Fri Aug 18, 2006 11:48 am Reply with quote

You can read about optimize in the MYSQL manual that's available on the web. Generally it reclaims space by getting rid of logically deleted records and "defragmenting" the file. You can also look at the source in optimize.php in the admin directory.

I'd downplay the chances you've been hacked. It would be a very subtle hacker who would do something like this to drive you nuts. Mostly they want to stick obscenities on sites and draw attention to themselves, not drive webmasters crazy.

There are many "relations" between the various forums tables (and other Nuke tables) that can go awry. For instance the number of posts may be stored in the nuke_users table as Montego indicated. Generally the programs that update the tables try to keep these in synch, thus if a post gets deleted the counter should be decremented. Or a user should not be deleted without deleting all his posts otherwise the remaining posts will have a "pointer to nowhere". In a full fledged relational database that is set up correctly with foreign keys etc. these relations are managed by the database management software in part so that you can't do something illogical. I'm not sure if it's a limitation of MYSQL or whether it's because most of us run it on a shared server but it doesn't appear to me that in a typical Nuke system this kind of relational integrity is automatically maintained.

What this leads to is that either (a) by a program error or (b) more likely by an adhoc or PHPmyadmin type access someone can create a situation where two or more tables are not in synch. You are also subject to how well the shared host you are on manages his database. Most do well but it's possible that they could screw something up with your tables.

In terms of a solution, what I'd do is disable your system sometime (so changes aren't taking place while you work) then dump of the structure and data for your tables and get them safely stored away on your home computer. Then I'd repair the tables and see what happens. If things get fouled up by the repair then at least you can restore your tables and get back into operation while you regroup.

You can also spelunk around the tables with phpmyadmin. For instance there is a table called bb_topics where the topics are stored. If the missing topic is still there then you should find it in this table. There is also a table called bb_posts. If you browse that you'll see that each post has a topic_id. There should be no topic_id that doesn't exist in the topics table. If there is then that's one source of your problems.

Hope that helps a little.
 
View user's profile Send private message Visit poster's website
mordain







PostPosted: Mon Aug 21, 2006 8:04 am Reply with quote

Thank you very much for the response. I have only been a webmaster for about two months, and was just nervous after that happened. I was afraid that something else that that could happen just as easily. A webmaster's work is never done, I suppose.
 
montego







PostPosted: Mon Aug 21, 2006 8:59 am Reply with quote

Quote:

A webmaster's work is never done, I suppose

Welcome to the "Club" Smile Your life will never be the same... killing me
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©