Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
5 registered (Ruben, Stan, SteveS, tradge, Pilgrim), 46 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/20/03
Posts: 4423
Top Posters (30 Days)
Ruben 51
DennyP 24
Gizmo 23
Dunny 17
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#182784 - 04/17/07 09:22 PM Broken Forum
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
My VPS was recreated today (moved to FC5 with php5 and mysql5) and now I'm having issues with the forum - each post is written with id of '0' and then the forum can't find it. I can go in and manually change the post id to the correct number and it seems to be fine, but new topics and replies are writing post id's as '0' - any idea what gives?

I'd think a corrupted forum file would corrupt the posts table, not just write the post id to '0'. I'd also think a corrupted posts table wouldn't work if I edited the topic (works fine).

Is there a setting somewhere that says what the last post id is? Maybe that's the setting that's corrupt...
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#182785 - 04/17/07 09:25 PM Re: Broken Forum [Re: AllenAyres]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
I'm getting this as the error with addpost.inc.php

- Duplicate entry '0' for key 1
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182786 - 04/17/07 10:19 PM Re: Broken Forum [Re: AllenAyres]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
Looks like it affects pm's as well.

Are my indexes screwed? I've repaired all the tables more than once from phpmyadmin.
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182787 - 04/18/07 12:01 AM Re: Broken Forum [Re: AllenAyres]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
It sounds like the auto_increment field is messed up. That field is supposed to automatically be populated with the next available number, always getting bigger, since it keeps trying to put it in as zero it sounds like that's the problem. I'm not sure how that can be fixed, but I'll see if I can find any info.
Top
#182788 - 04/18/07 12:47 AM Re: Broken Forum [Re: Rick]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
thank you Rick - I can give you access if you need to check it out.

Where would I check the auto_increment field setting? I don't see it in relation to the POST_ID column.
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182789 - 04/18/07 01:08 AM Re: Broken Forum [Re: AllenAyres]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
ugh, every table looks like it should be auto_increment in the id column's extra field (naturally), except that it's now gone. I have to go back and fix every table now. Any shortcut command? \:\)
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182791 - 04/18/07 01:22 AM Re: Broken Forum [Re: AllenAyres]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
well, maybe not every table, but 22 of 55 :smash:
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182792 - 04/18/07 01:49 AM Re: Broken Forum [Re: AllenAyres]
Gizmo Offline

Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
Wow, thats quite a dandy issue allen lol
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#182795 - 04/18/07 02:20 AM Re: Broken Forum [Re: Gizmo]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
yes, it is for the threads forum, now I have to figure out the photopost tables :smash:
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182796 - 04/18/07 04:02 AM Re: Broken Forum [Re: AllenAyres]
Gizmo Offline

Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
I'm rather curious what the hell happened lol... I don't see how the FC upgrade would have affected the MySQL schema...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#182815 - 04/18/07 10:29 AM Re: Broken Forum [Re: Gizmo]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
Tell me about it - there's 21 databases on that vps I have to go through and see what's broke. Most of them I'm going to drop the tables and re-create.
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182816 - 04/18/07 10:30 AM Re: Broken Forum [Re: Gizmo]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
The first thing you can try is to reset the auto_increment field to what it should be. First, you'd need to find the max id for the table. For example, the posts table.

select MAX(POST_ID) from ubbt_POSTS

That will come back with some number, say 12345. Add one to that number and use it in the following query:

ALTER TABLE ubbt_POSTS AUTO_INCREMENT=123456;

If that doesn't fix it then it might require altering the row to drop the auto_increment field and then readding it.

ALTER TABLE ubbt_POSTS CHANGE POST_ID POST_ID int(11) unsigned primary key

then:

ALTER TABLE ubbt_POSTS CHANGE POST_ID POST_ID int(11) unsigned auto_increment primary key



Even though the tables are already messed up, I'd recommend doing a backup before doing anything, just in case something happens and it makes it worse.
Top
#182819 - 04/18/07 10:58 AM Re: Broken Forum [Re: Rick]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
Thank you, that's what I did 44 times last night - actually with the first one I edited the column manually with phpmyadmin then just copied the resulting mysql command into ultraedit ( \:p ) to save for the second forum \:\) I started to write an altertable script for practice, but at 1am I decided I don't need to practice that much

I have to sort out photopost on those 2 sites then basically drop the other databases on the other sites and re-install.

I don't think we'll be re-creating the vps any time soon again ;\)
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#182836 - 04/18/07 06:56 PM Re: Broken Forum [Re: AllenAyres]
Gizmo Offline

Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
"backup before upgrading" comes to mind all too clearly lol...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10489 Members
36 Forums
33841 Topics
181706 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image