Previous Thread
Next Thread
Print Thread
Hop To
#229514 09/27/2009 6:26 PM
Joined: Jan 2008
Posts: 81
D
DougMM Offline OP
journeyman
OP Offline
journeyman
D
Joined: Jan 2008
Posts: 81
OK I had a server upgrade this weekend and my board is now down. When making a post I get this error.

Code
We encountered a problem. The reason reported was 
Script: /services/webpages/util/c/a/capitalstang.site.aplus.net/public/boards/scripts/addpost.inc.php
Line#: 480
SQL Error: Duplicate entry '0' for key 1
SQL Error #: 1062
Query: INSERT INTO cts_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,POST_POSTER_NAME,POST_MD5) VALUES ( 96028 , 11505 , 0 , 1254095642 , '72.177.81.28' , 'Re: Mom and Pop Slick' , 'lol' , 'lol' , 1 , 'book.gif' , 0 , 0 , 'markup' , 2 , 11 , 1 , 0 , 'DougMM' , '' )
I did a quick google search on the 1062 error and found this info.
http://www.theadminzone.com/forums/showthread.php?t=32498
When you restored it probably didn't pick the auto_increment attribute on the fields that should have it. They are:

phpbb_groups.group_id
phpbb_banlist.ban_id
phpbb_categories.cat_id
phpbb_disallow.disallow_id
phpbb_forum_prune.prune_id
phpbb_posts.post_id **
phpbb_privmsgs.privmsgs_id
phpbb_ranks.rank_id
phpbb_search_wordlist.word_id
phpbb_smilies.smilies_id
phpbb_themes.themes_id
phpbb_topics.topic_id
phpbb_vote_desc.vote_id
phpbb_words.word_id

**This would be the one causing the error you posted. Check using phpMyAdmin or whatever database tool you prefer, and make sure these fields are set to auto_increment.

What would fields in UBB should I look into for this error?

Thanks for all of your help..

Last edited by Gizmo; 09/27/2009 7:40 PM. Reason: [code] tags
DougMM #229515 09/27/2009 6:40 PM
Joined: Jan 2008
Posts: 81
D
DougMM Offline OP
journeyman
OP Offline
journeyman
D
Joined: Jan 2008
Posts: 81
Sorry, 7.4

DougMM #229516 09/27/2009 9:19 PM
Joined: Jan 2008
Posts: 81
D
DougMM Offline OP
journeyman
OP Offline
journeyman
D
Joined: Jan 2008
Posts: 81
Do you think upgreading to 7.4.1 would fix this problem?

DougMM #229520 09/28/2009 1:42 AM
Joined: Jun 2006
Posts: 9,242
R
Former Developer
Offline
Former Developer
R
Joined: Jun 2006
Posts: 9,242
For UBB.threads you'd want to look at the cts_POSTS table (going by your error that, looks like your prefix).

The POST_ID field should be an auto_increment field

Rick #231955 12/09/2009 11:58 PM
Joined: Oct 2008
Posts: 16
T
stranger
Offline
stranger
T
Joined: Oct 2008
Posts: 16
I have the same problem and error using UBB.threads™ 7.3.1 and the POST_ID field is an auto_increment field. Is there anything else I can try?

Last edited by trphoto; 12/09/2009 11:59 PM.

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Scroll Up Button
by JAISP - 04/28/2021 7:39 AM
[Cannot Replicate] Unapprove Post Bug
by Larry Miller - 04/26/2021 10:07 AM
Just popping in
by Harold - 04/25/2021 9:05 PM
Moving Forum/Category location
by ECNet - 04/25/2021 12:11 PM
7.7.5 become member issue
by Ruben - 04/15/2021 10:06 AM
Who's Online Now
1 members (Ruben), 74 guests, and 54 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5