Posting problem

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Registered User
Posts: 157
Joined: Mon Jul 07, 2003 8:59 am
Location: Boston UK

Posting problem

Post by cooky »

I backed up the database recently and after re-installinig it I got the following message

Error in posting


SQL Error : 1062 Duplicate entry '9010' for key 1

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (9010, 'afa', '0e58b275ed', 'frafra')

Line : 282
File : functions_post.php

Any idea what this means

User avatar
Project Manager
Project Manager
Posts: 29299
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko

Post by Marshalrusty »

Repairing the table should reset the auto increment.
  1. Create a fix.php file with the following:

    Code: Select all

    define('IN_PHPBB', true);
    $page_title = 'phpBB Fix';
    $sql = "REPAIR TABLE phpbb_posts_text";
    message_die(GENERAL_MESSAGE, '<table width="80%" class="forumline"><tr><td><b>Query: </b>' . $sql . '<br /><b>Status: </b><font color="' . ((!($db->sql_query($sql))) ? 'red">Error running query (' . mysql_error() . ')</font><br /><br /><br /><b>Be sure to post this message in your topic on</b><br />' : 'green">Ran successfully</font><br /><br /><br />') . '<b>For security reasons, delete this file when you are finished.</b></td><tr></table>');
  2. Upload the file to your board's root folder (the one with config.php)
  3. Run it by navigating to the file in your browser (ex.
  4. If any errors come up, post the report here.
  5. Be sure to delete the file; don't leave it on your server
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Registered User
Posts: 157
Joined: Mon Jul 07, 2003 8:59 am
Location: Boston UK

Post by cooky »

ran the test and it's still the same

Query: REPAIR TABLE phpbb_posts_text
Status: Ran successfully

Return to “2.0.x Support Forum”