here it is!

File: /usr/local/www/lover/htdocs/forum/index.php
Line: 68

PunBB reported: Unable to fetch category/forum list

Database reported: Got error 28 from storage engine (Errno: 1030)

please, help!
How to avoid this?
It just happens in a random moment, and even server reboot diesn't help.
I'm sure that is something within PunBB, because we just moved our forum to other server with even other OS, but the problem stays with us sad(.

THANKS.
done.
next time I see the problem Ill be able to tell you more.

3

(2 replies, posted in PunBB 1.2 troubleshooting)

I'm trying to upgrade from 1.2.10 to 1.2.14]

I've made the manual file changes according to
http://punbb.org/download/hdiff/hdiff-1 … .2.14.html

Is that all? I afraid no. What else should I do to upgrade ?

Also I worry a bit about my mods (subforums, PMs, attaches etc). Will it be OK ?

just spent 20 minutes searching where to Enable debug mode.
Unsuccessful.
How to do so ?

Very often, when entering the forum, we see (instead of forum list):

An error was encountered
Error: Unable to fetch category/forum list.

or

An error was encountered
Error: Unable to delete from online list


The only thing, that helps in this situation is rebooting the server.
How to solve the problem ??

That's odd, for I began my PunBB forum in january, and thus started from a version 1.2.10   :\
Now, I'll aply the patch..

I got it!
Our major problem really boils down to a minor problem I described (guest posts shown up multiple times) !

When I created a copy of my database and used it together with fresh-downloaded PunBB 1.2.12 (http://lover.org.ua/f1), this is what I saw:
(all posts became visible)
Everything becomes clear by comparing two topics (two copies of one topic, really):
http://lover.org.ua/f1/viewtopic.php?id=54&p=2
http://www.lover.org.ua/forum/viewtopic … 54&p=2

This is what we have: every guest's post is shown as many times, as many guests are currently online! But the total number of posts in a topic is not increased!  So we don't see some last messages!
For example, if there are 2 guest-posts in a topic, and 10 guest are currently online, we will not be able to see 20-2=18 last posts!!!
This is the point.

Now a question: how do I solve that problem?

This is my  viewtopic.php:

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'include/attach/attach_incl.php'; //Attachment Mod row, loads variables, functions and lang file

if ($pun_user['g_read_board'] == '0')
        message($lang_common['No view']);


$action = isset($_GET['action']) ? $_GET['action'] : null;
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
$pid = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
if ($id < 1 && $pid < 1)
        message($lang_common['Bad request']);

// Load the viewtopic.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';


// If a post ID is specified we determine topic ID and page number so we can redirect to the correct message
if ($pid)
{
        $result = $db->query('SELECT topic_id FROM '.$db->prefix.'posts WHERE id='.$pid) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
        if (!$db->num_rows($result))
                message($lang_common['Bad request']);

        $id = $db->result($result);

        // Determine on what page the post is located (depending on $pun_user['disp_posts'])
        $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY posted') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
        $num_posts = $db->num_rows($result);

        for ($i = 0; $i < $num_posts; ++$i)
        {
                $cur_id = $db->result($result, $i);
                if ($cur_id == $pid)
                        break;
        }
        ++$i;   // we started at 0

        $_GET['p'] = ceil($i / $pun_user['disp_posts']);
}

// If action=new, we redirect to the first new post (if any)
else if ($action == 'new' && !$pun_user['is_guest'])
{
        $result = $db->query('SELECT MIN(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id.' AND posted>'.$pun_user['last_visit']) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
        $first_new_post_id = $db->result($result);

        if ($first_new_post_id)
                header('Location: viewtopic.php?pid='.$first_new_post_id.'#p'.$first_new_post_id);
        else    // If there is no new post, we go to the last post
                header('Location: viewtopic.php?id='.$id.'&action=last');

        exit;
}

// If action=last, we redirect to the last post
else if ($action == 'last')
{
        $result = $db->query('SELECT MAX(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
        $last_post_id = $db->result($result);

        if ($last_post_id)
        {
                header('Location: viewtopic.php?pid='.$last_post_id.'#p'.$last_post_id);
                exit;
        }
}


// Fetch some info about the topic
if (!$pun_user['is_guest'])
        $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
        $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
                
if (!$db->num_rows($result))
        message($lang_common['Bad request']);

$cur_topic = $db->fetch_assoc($result);

// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array();
$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false;

// Can we or can we not post replies?
if ($cur_topic['closed'] == '0')
{
        if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1' || $is_admmod)
                $post_link = '<a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
        else
                $post_link = ' ';
}
else
{
        $post_link = $lang_topic['Topic closed'];

        if ($is_admmod)
                $post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
}


// Determine the post offset (based on $_GET['p'])
$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
$start_from = $pun_user['disp_posts'] * ($p - 1);

// Generate paging links
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewtopic.php?id='.$id);


if ($pun_config['o_censoring'] == '1')
        $cur_topic['subject'] = censor_words($cur_topic['subject']);


$quickpost = false;
if ($pun_config['o_quickpost'] == '1' &&
        !$pun_user['is_guest'] &&
        ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1')) &&
        ($cur_topic['closed'] == '0' || $is_admmod))
{
        $required_fields = array('req_message' => $lang_common['Message']);
        $quickpost = true;
}

if (!$pun_user['is_guest'] && $pun_config['o_subscriptions'] == '1')
{
        if ($cur_topic['is_subscribed'])
                // I apologize for the variable naming here. It's a mix of subscription and action I guess :-)
                $subscraction = '<p class="subscribelink clearb">'.$lang_topic['Is subscribed'].' - <a href="misc.php?unsubscribe='.$id.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
        else
                $subscraction = '<p class="subscribelink clearb"><a href="misc.php?subscribe='.$id.'">'.$lang_topic['Subscribe'].'</a></p>'."\n";
}
else
        $subscraction = '<div class="clearer"></div>'."\n";

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

?>
<div class="linkst">
        <div class="inbox">
                <p class="pagelink conl"><?php echo $paging_links ?></p>
                <p class="postlink conr"><?php echo $post_link ?></p>
<?php

if($cur_topic['parent_forum'])
        echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a> </li><li>» <a href="viewforum.php?id='.$cur_topic['parent_forum_id'].'">'.pun_htmlspecialchars($cur_topic['parent_forum']).'</a> </li><li>» <a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a> </li><li>» '.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
else
        echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a></li><li> » <a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a></li><li> » '.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
                
?>
                
                <div class="clearer"></div>
        </div>
</div>

<?php


require PUN_ROOT.'include/parser.php';

$bg_switch = true;      // Used for switching background color in posts
$post_count = 0;        // Keep track of post numbers

// Retrieve the posts (and their respective poster/online status)
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], false) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); //Attachment Mod, changed the true to false...
while ($cur_post = $db->fetch_assoc($result))
{
        $post_count++;
        $user_avatar = '';
        $user_info = array();
        $user_contacts = array();
        $post_actions = array();
        $is_online = '';
        $signature = '';

        // If the poster is a registered user.
        if ($cur_post['poster_id'] > 1)
        {
                $username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
                $user_title = get_title($cur_post);

                if ($pun_config['o_censoring'] == '1')
                        $user_title = censor_words($user_title);

                // Format the online indicator
                $is_online = ($cur_post['is_online'] == $cur_post['poster_id']) ? '<strong>'.$lang_topic['Online'].'</strong>' : $lang_topic['Offline'];

                if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
                {
                        if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
                                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
                        else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
                        else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
                }
                else
                        $user_avatar = '';

                // We only show location, register date, post count and the contact links if "Show user info" is enabled
                if ($pun_config['o_show_user_info'] == '1')
                {
                        if ($cur_post['location'] != '')
                        {
                                if ($pun_config['o_censoring'] == '1')
                                        $cur_post['location'] = censor_words($cur_post['location']);

                                $user_info[] = '<dd>'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']);
                        }

                        $user_info[] = '<dd>'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']);

                        if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
                                $user_info[] = '<dd>'.$lang_common['Posts'].': '.$cur_post['num_posts'];

                        // Now let's deal with the contact links (E-mail and URL)
                        if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
                                $user_contacts[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
                        else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
                                $user_contacts[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';
                        require(PUN_ROOT.'include/pms/viewtopic_PM-link.php');
                        
                        if ($cur_post['url'] != '')
                                $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
                }

                if ($pun_user['g_id'] < PUN_GUEST)
                {
                        $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

                        if ($cur_post['admin_note'] != '')
                                $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';
                }
        }
        // If the poster is a guest (or a user that has been deleted)
        else
        {
                $username = pun_htmlspecialchars($cur_post['username']);
                $user_title = get_title($cur_post);

                if ($pun_user['g_id'] < PUN_GUEST)
                        $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

                if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'])
                        $user_contacts[] = '<a href="mailto:'.$cur_post['poster_email'].'">'.$lang_common['E-mail'].'</a>';
        }

        // Generation post action array (quote, edit, delete etc.)
        if (!$is_admmod)
        {
                if (!$pun_user['is_guest'])
                        $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>';

                if ($cur_topic['closed'] == '0')
                {
                        if ($cur_post['poster_id'] == $pun_user['id'])
                        {
                                if ((($start_from + $post_count) == 1 && $pun_user['g_delete_topics'] == '1') || (($start_from + $post_count) > 1 && $pun_user['g_delete_posts'] == '1'))
                                        $post_actions[] = '<li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>';
                                if ($pun_user['g_edit_posts'] == '1')
                                        $post_actions[] = '<li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>';
                        }

                        if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
                                $post_actions[] = '<li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';
                }
        }
        else
                $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>'.$lang_topic['Link separator'].'</li><li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>'.$lang_topic['Link separator'].'</li><li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>'.$lang_topic['Link separator'].'</li><li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';


        // Switch the background color for every message.
        $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true;
        $vtbg = ($bg_switch) ? ' roweven' : ' rowodd';


        // Perform the main parsing of the message (BBCode, smilies, censor words etc)
        $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

        // Do signature parsing/caching
        if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
        {
                if (isset($signature_cache[$cur_post['poster_id']]))
                        $signature = $signature_cache[$cur_post['poster_id']];
                else
                {
                        $signature = parse_signature($cur_post['signature']);
                        $signature_cache[$cur_post['poster_id']] = $signature;
                }
        }

        // Attachment Mod Block Start
                $attach_allow_download = false;
                        $attach_output = '';
                                $attach_num = 0;
                                        // Check if this post has any attachments
                                                $result_attach = $db->query('SELECT af.id, af.filename, af.size, af.downloads FROM '.$db->prefix.'attach_2_files AS af WHERE af.post_id='.$cur_post['id']) or error('Unable to fetch if there were any attachments to the post', __FILE__, __LINE__, $db->error());
                                                        $attach_num = $db->num_rows($result_attach);
                                                                if($attach_num > 0){
                                                                                if($pun_user['g_id']==PUN_ADMIN)$attach_allow_download=true;
                                                                                                else{           //fetch the rules of the forum, and check so that the user is allowed to download.
                                                                                                                        $result_attach_two = $db->query('SELECT ar.rules FROM '.$db->prefix.'attach_2_rules AS ar WHERE ar.group_id=\''.$pun_user['group_id'].'\' AND ar.forum_id='.$cur_topic['forum_id'].' LIMIT 1')or error('Unable to fetch rules for the attachments', __FILE__, __LINE__, $db->error());
                                                                                                                                                if($db->num_rows($result_attach_two)==1){
                                                                                                                                                                                list($attach_rules)=$db->fetch_row($result_attach_two);
                                                                                                                                                                                                                $attach_allow_download = attach_rules($attach_rules,ATTACH_DOWNLOAD);
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                        if($attach_allow_download){//check if the user is allowed to download it.
                                                                                                                                                                                                                                                                                                $attach_output .= $lang_attach['Attachments:'].' ';
                                                                                                                                                                                                                                                                                                                        while(list($attachment_id, $attachment_filename, $attachment_size, $attachment_downloads)=$db->fetch_row($result_attach)){
                                                                                                                                                                                                                                                                                                                                                        $attachment_extension=attach_get_extension($attachment_filename);
                                                                                                                                                                                                                                                                                                                                                                                        $attach_output .= '<br />'."\n\t\t\t\t\t\t".attach_icon($attachment_extension).' <a href="./attachment.php?item='.$attachment_id.'">'.$attachment_filename.'</a>, '.$lang_attach['Size:'].' '.number_format($attachment_size).' '.$lang_attach['bytes'].', '.$lang_attach['Downloads:'].' '.number_format($attachment_downloads);
                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                // Attachment Mod Block End
                                                                                                                                                                                                                                                                                                                                                                                                                                                
?>
<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">
        <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
        <div class="box">
                <div class="inbox">
                        <div class="postleft">
                                <dl>
                                        <dt><strong><?php echo $username ?></strong></dt>
                                        <dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
                                        <dd class="postavatar"><?php echo $user_avatar ?></dd>
<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode('  ', $user_contacts).'</dd>'."\n"; ?>
                                </dl>
                        </div>
                        <div class="postright">
                                <h3><?php if (($post_count + $start_from) > 1) echo ' Re: '; ?><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></h3>
                                <div class="postmsg">
                                        <?php echo $cur_post['message']."\n" ?>
<?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
<?php if ($attach_allow_download) echo "\t\t\t\t\t".'<div class="postsignature"><hr />'.$attach_output.'</div>'."\n"; ## Attachment Mod row ?>
                                </div>
<?php if ($signature != '') echo "\t\t\t\t".'<div class="postsignature"><hr />'.$signature.'</div>'."\n"; ?>
                        </div>
                        <div class="clearer"></div>
                        <div class="postfootleft"><?php if ($cur_post['poster_id'] > 1) echo '<p>'.$is_online.'</p>'; ?></div>
                        <div class="postfootright"><?php echo (count($post_actions)) ? '<ul>'.implode($lang_topic['Link separator'].'</li>', $post_actions).'</li></ul></div>'."\n" : '<div> </div></div>'."\n" ?>
                </div>
        </div>
</div>

<?php

}

?>
<div class="postlinksb">
        <div class="inbox">
                <p class="postlink conr"><?php echo $post_link ?></p>
                <p class="pagelink conl"><?php echo $paging_links ?></p>
<?php

if($cur_topic['parent_forum'])
        echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a> </li><li>» <a href="viewforum.php?id='.$cur_topic['parent_forum_id'].'">'.pun_htmlspecialchars($cur_topic['parent_forum']).'</a> </li><li>» <a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a> </li><li>» '.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
else
        echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a></li><li> » <a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a></li><li> » '.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
?>
                
                <?php echo $subscraction ?>
        </div>
</div>

<?php

// Display quick post if enabled
if ($quickpost)
{

?>
<div class="blockform">
        <h2><span><?php echo $lang_topic['Quick post'] ?></span></h2>
        <div class="box">
                <form method="post" action="post.php?tid=<?php echo $id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
                        <div class="inform">
                                <fieldset>
                                        <legend><?php echo $lang_common['Write message legend'] ?></legend>
                                        <div class="infldset txtarea">
                                                <input type="hidden" name="form_sent" value="1" />
                                                <input type="hidden" name="form_user" value="<?php echo (!$pun_user['is_guest']) ? pun_htmlspecialchars($pun_user['username']) : 'Guest'; ?>" />
                                                <label><textarea name="req_message" rows="7" cols="75" tabindex="1"></textarea></label>
                                                <ul class="bblinks">
                                                        <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                                                        <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                                                        <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                                                </ul>
                                        </div>
                                </fieldset>
                        </div>
                        <p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
                </form>
        </div>
</div>
<?php

}

// Increment "num_views" for topic
$low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
$db->query('UPDATE '.$low_prio.$db->prefix.'topics SET num_views=num_views+1 WHERE id='.$id) or error('Unable to update topic', __FILE__, __LINE__, $db->error());

$forum_id = $cur_topic['forum_id'];
$footer_style = 'viewtopic';
require PUN_ROOT.'footer.php';

Smarty, thanks for an idea! But I still do need Your help.

Rickard wrote:

1. Are you running 1.2.12? If not, upgrade.

We run 1.2.10.  OK, I'll try to upgrade (hope my installed mods will not interfere). But the solvation of such problem is nowhere noticed

Rickard wrote:

2. Have you made any modifications to the scripts? If yes, try it with a fresh copy.

I installed some mods:

- attach mod
- private messaging
- subforums

we really need each of these.
Hope this is OK, and it will not disallow me to upgrade and solve the problem?


Also, really hoping the problem will be solved this time, I've put back a link to PunBB.org.

Smartys wrote:

Lets see
Since the posts are in the database, does poster_id match up to a valid row in users?

yes, in the case of above problem, poster_id=251,  and the appropriate user exists. He is the author of the undisplayed post wink

Frank H wrote:

are the 'missing' posts in the database?

Yes, they are. And sometimes they even get shown after a while.

We removed a link, when for a long time  noone helped us with a problem. Also we can't find a migration tool from punbb to ANY other forum engine (if we could - we'd used it).
And the ultimate reason is the described PROBLEM!!!.

If someone really helps us with it - we are sure to put the copyright link back, to forget about a migration tool search, and to be happy within a punBB comunity.
You see - our comunity is just dying because of THE PROBLEM>

Please, do not discuss any other question (moral, etc) in this topic!!! Only write here if You know how to solve a problem.

For more than half a year we heve a terrible problem in our PunBB forum.

It is:
new posts not showing up!
Some last messages are just not displayed, and the topic is displayed as if those messages did not exist!

When we view a list of topics in forum, the last message's time and author is displayed correctly. But when we even click on the "last mesage" link, we do not see the message, and often - some previous messages !!!!!!

Seems like the longer the topic is, the more last messages are undisplayed ;((((((((((((((((.

Here's a current example:
topic       http://lover.org.ua/forum/viewtopic.php … 514#p13514 - some last last messages are undisplayed !!!
if we view the forum: http://lover.org.ua/forum/viewforum.php?id=8 - we see the time and author of last message, but it is, as well, undisplayed!!

(Also here's an another problem - posts showing up multiple times. I found a solution for users, but not for guests. It's also unconvenient, but not as life-critical as just unability to see th info !!!)

You see, it's terrible, and we are really awfully disappointed.

PLEASE, HELP with exact advise - how to fix ??? (we already put the question, but people here seem to believe in PunBB and are talking about problems in client-browsers, proxies, DB, etc. That's all stuff and nonsense, problem IS IN PUNBB!!!!!)

Hepl!!

And who of us two is fool?

Topic http://punbb.org/forums/viewtopic.php?id=11936 is named "duplicate posts and new posts not showing up"

Are there any migration tools from PunBB to any other forum engines ? (at least phpBB) ?
I didn't find any yet sad.

Because we have some serious problems with PunBB, and it seems like noone can help us sad.

I'm my host.

And I really don't believe in server's fault like caching, I'm sure it's an PunBB bug , because:

1) other sites and forums work properly
2) PunBB also work properly, put  this (and 2 minor) moments
3) different people see th same problem about our forum
4)they http://punbb.org/forums/viewtopic.php?id=11936 seem to have the same problem.

sad((((((

Anyone can help ?

We still suffer greatly from a problem of " New messages in a topic are not available"  !!!

Right now I can't read a message, which was written more than 2 hours ago (according to "last message" in a forum view)!
Though it is rather important for me to read that message sad(((.

Can anyone help with the problem ?????

2Reines :
(once again)
When we view a list of topics in forum, the last message's time and author is displayed correctly. But when we click on the "last mesage" link, we do not see the message !!! We see exactly the same picture as if we click on a topic - we see a topic without that message!

I guess this could not happen because of cache. Also different people from different places deal with these problems sad(

I don't realy believe that is because of MySQK, but here you are:

Environment
Operating system: Linux
PHP: 4.3.10 - Show info
Accelerator: N/A

Database
MySQL 4.1.8a-log
Rows: 282061
Size: 11.13 MB

2Smartys :
Yeah, rather usuall situation for our forum sad(.
I bet I  didn't  do any special changes, but installing 2 plugins.
(our forum is: PunBB 1.2.10 +  Private messages,  + Attaches)
I may send you any source code file, or even all files gziped.

Would be nice to understand what's wrong with us smile

2elbekko :  I suppose you're wrong, no problems with characters here..

so what about described bugs ?
Does anyone going to help us about them ??

The adress of our forum is http://www.lover.org.ua/forum/

PS Also we remarked an another bug: guest's post often apperar dupluicated (OR EVEN 3 TIMES) in a topic,  with exactly the same time..
Yet another minor duplication bug: in a "active user"-list one and the same user often appears more than once.

2eblekko:
I suppose it is not ANYWHERE in the topic.
I didn't do any changes, but installing 2 (I bet) plugins..
(let me recall: Private messages, attaches. )

I'm not really trying to threaten anyone, I'm not that silly smile.
Simply I included one more question in my message, that is "Are there any  migration tools from PunBB to other forum-engines ?", 'cause I already thought about that sometime, and didn't find any.
Generally, I do adore the main idea of PunBB, and that is why I'm here.

About "What EXACTLY is happening".
Message, I suppose, gets added to DB.  But when we view a topic, it isn't there . When we view a list of topics in forum, the last message's time and author is displayed correctly. But when we click on the "last mesage" link, we do not see the message !!! We see exactly the same picture as if we click on a topic - we see a topic without that message!
After some time (such as 30 minutes for instance) everything get's nomal and messages become visible.
That is what EXACTLY is happening..

Rather serious problem.
Often new messages in a topic are not available!!!
Some last messages are just not displayed, and the topic is displayed as if those messages did not exist!

The problem is very serious for us, for a long time we are unable to do anything with it..

If we don't find a solution, next question will be "are there any migration tools from PunBB to other forum-engines? I didn't see such tools yet sad"

I mean that if user, who is not allowed to read a forum, clicks on it, he sees "Sorry, you are not allowed here!"