Previous Thread
Next Thread
Print Thread
Hop To
#182784 04/17/2007 9:22 PM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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
AllenAyres #182785 04/17/2007 9:25 PM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
I'm getting this as the error with addpost.inc.php

- Duplicate entry '0' for key 1


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #182786 04/17/2007 10:19 PM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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
AllenAyres #182787 04/18/2007 12:01 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Rick #182788 04/18/2007 12:47 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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
AllenAyres #182789 04/18/2007 1:08 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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? smile


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #182791 04/18/2007 1:22 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
well, maybe not every table, but 22 of 55 :smash:


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #182792 04/18/2007 1:49 AM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Wow, thats quite a dandy issue allen lol


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #182795 04/18/2007 2:20 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
yes, it is for the threads forum, now I have to figure out the photopost tables :smash:


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #182796 04/18/2007 4:02 AM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
I'm rather curious what the hell happened lol... I don't see how the FC upgrade would have affected the MySQL schema...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #182815 04/18/2007 10:29 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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
Gizmo #182816 04/18/2007 10:30 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Rick #182819 04/18/2007 10:58 AM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
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 ( tongue ) to save for the second forum smile I started to write an altertable script for practice, but at 1am I decided I don't need to practice that much eek

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 wink


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #182836 04/18/2007 6:56 PM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
"backup before upgrading" comes to mind all too clearly lol...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (rootman), 641 guests, and 112 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)