Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2006
Posts: 34
N
newbie
newbie
N Offline
Joined: Oct 2006
Posts: 34
Quote
Script: /home/vs020b2/public_html/forums/scripts/addpost.inc.php
Line#: 473
SQL Error: Duplicate entry '25749' for key 1
SQL Error #: 1062
Query: INSERT INTO ubbt_POSTS (POST_PARENT_ID,TOPIC_ID,POST_IS_TOPIC,POST_POSTED_TIME,POST_POSTER_IP,POST_SUBJECT,POST_BODY,POST_DEFAULT_BODY,POST_IS_APPROVED,POST_ICON,POST_HAS_POLL,POST_HAS_FILE,POST_MARKUP_TYPE,USER_ID,POST_PARENT_USER_ID,POST_ADD_SIGNATURE,POST_LAST_EDITED_TIME) VALUES ( 25730 , 2901 , 0 , 1168272336 , '89.100.182.164' , 'Re: installing zinc osx 10.3' , 'Test post' , 'Test post' , 1 , 'book.gif' , 0 , 0 , 'markup' , 11 , 68 , 1 , 0 )

Please use your back button to return to the previous page.

The board recently had to be lifted from one server to another. It certainly appeared to be working okay, but it's broken as of this morning - maybe a few days after the move. Suggestions?

http://www.bannister.org/forums/

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Can you post an all new post, or was this an all new post?

Basically MySQL says that exact post already exists so it can't create it. You could edit it, but not create it.

.

Joined: Oct 2006
Posts: 34
N
newbie
newbie
N Offline
Joined: Oct 2006
Posts: 34
No, you can't reply to a post or start a new topic. I figured it was something like that post already existing. I can't seem to locate the offending post, however. Suggestions?

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
This may require deletion of your session for PHP.

It also might require some manual SQL changes so I'll leave that to someone with more experience to assist you so that I don't lead you down the wrong path.

I'm sure someone can assist you within the next few hours.

.


Joined: Jun 2006
Posts: 16,300
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,300
Likes: 116
It's an SQL error, deleting his session won't matter; I've seen this before but forget the fix, so he'll need to wait for Rick to take a gander.


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!
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
That's a bit strange. Basically '25749' is a number that is automatically generated by MySQL as the post id for the post that is being inserted. The auto_increment property is supposed to take care of that. But, that error is saying that post id already exists. I don't think I've ever seen MySQL do that before.

First thing to do would be to find out the actual max post id in the posts table. So try this SQL command:

select max(POST_ID) from ubbt_POSTS

Joined: Oct 2006
Posts: 34
N
newbie
newbie
N Offline
Joined: Oct 2006
Posts: 34
25748

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, that's very strange. Definitely sounds like MySQL is a bit of sync since when you try to insert a new post, it thinks 25749 is already in there. Perhaps try repairing the table:

repair table ubbt_POSTS

Joined: Oct 2006
Posts: 34
N
newbie
newbie
N Offline
Joined: Oct 2006
Posts: 34
That appears to have done the trick.

Number of rows changed from 25729 to 25730...

Richard


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
0 members (), 740 guests, and 145 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 20240501)