Previous Thread
Next Thread
Print Thread
Hop To
#229514 09/27/2009 6:26 PM
Joined: Jan 2008
Posts: 81
D
journeyman
journeyman
D Offline
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
journeyman
journeyman
D Offline
Joined: Jan 2008
Posts: 81
Sorry, 7.4

DougMM #229516 09/27/2009 9:19 PM
Joined: Jan 2008
Posts: 81
D
journeyman
journeyman
D Offline
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
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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
stranger
T Offline
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
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)