raymond: I don't know. But if that query is taking that long to make, it's bad wink

1,852

(71 replies, posted in News)

I can't replicate the issue here: have you modified login.php or the redirect function?

You would have to run an EXPLAIN on that query on both servers to see where exactly the issue is.

Smartys: I've enabled debug mode. When I enter General Forum, it says "[ Generated in 24.319 seconds, 7 queries executed ]". It's definitely slow, but how do I check which specific query is lgging?

Enable PUN_SHOW_QUERIES

Also, paste the contents of your viewforum.php here, that might also help.

1,855

(4 replies, posted in Feature requests)

($hook = get_hook('fn_generate_crumbs_end')) ? eval($hook) : null;

There is one wink

1,856

(15 replies, posted in PunBB 1.2 bug reports)

StevenBullen wrote:

Sorry I didnt mean to hassle. Thanks for the info smartys.

Oh, don't worry about it wink
The bug was this one: http://dev.punbb.org/changeset/1094
Basically, we didn't check the referrer when changing passwords. Not an issue for normal users, since they require the old password to be inputted, but admins/mods that can edit passwords would submit without an issue.

1,857

(2 replies, posted in PunBB 1.2 modifications, plugins and integrations)

Moved to Integration

Tables can't be deleted on their own. You need to execute a query to delete them. Talk to your host.

1,859

(15 replies, posted in PunBB 1.2 bug reports)

Which you posted prior to a working, official release. In other words, people wouldn't necessarily know to upgrade but the problem would still be disclosed.

1,860

(55 replies, posted in PunBB 1.2 discussion)

Well, can you send me a dump of the phpBB forums table then? Obviously I'm not understanding how phpBB relates forums to categories.

Enable debug mode and show queries, see if a specific query is lagging.

1,862

(71 replies, posted in News)

It's linked from the downloads page, just like everything else...

1,863

(71 replies, posted in News)

Check out the downloads page, as always there's a patch and an hdiff. However, you still need to apply the workaround at this point.

1,864

(71 replies, posted in News)

StevenBullen wrote:

Has this fix been applied on PunBB (here)?

No

1,865

(15 replies, posted in PunBB 1.2 bug reports)

Lets wait until there's a completely working version of 1.2.16? wink

Yes, we know, I've already posted about this wink

http://punbb.org/forums/viewtopic.php?p … 65#p103965

1,868

(71 replies, posted in News)

Just do the following (this might not be how Rickard corrects the issue, this is a temporary fix):

include/functions.php
FIND

$destination_url = str_replace(array("\r", "\n", '%0a', '%0d', ';'), '', $destination_url);

REPLACE WITH

$destination_url = str_replace(array("\r", "\n", '%0a', '%0d', ';data:'), '', $destination_url);

Yes, there is a small issue with one of the changes, Rickard will deal with it tomorrow

1,870

(71 replies, posted in News)

You might want to hold off on downloading the update for now, there's a little issue with it that needs to be dealt with by Rickard tomorrow.

1,871

(55 replies, posted in PunBB 1.2 discussion)

I updated my code above, try now, see if it changed anything

1,872

(12 replies, posted in Programming)

Oh, like the Miserable Users mod?
http://www.vbulletin.org/forum/showthread.php?t=121886
Good idea tongue

1,873

(55 replies, posted in PunBB 1.2 discussion)

OK, new code for forums.php, this should put all subforums in their own category.

<?php

    // Fetch forum info
    $result = $fdb->query('SELECT * FROM '.$_SESSION['php'].$_SESSION['phpnuke'].'forums WHERE forum_id>'.$start.' AND forum_type != 0 ORDER BY forum_id LIMIT '.$_SESSION['limit']) or myerror('phpBB: Unable to get table: forums', __FILE__, __LINE__, $fdb->error());
    $last_id = -1;
    while($ob = $fdb->fetch_assoc($result))
    {
        $last_id = $ob['forum_id'];
        echo $ob['forum_name'].' ('.$ob['forum_id'].")<br>\n"; flush();

        // Check for anonymous poster id problem
        $ob['forum_last_post_id'] == -1 ? $ob['forum_last_post_id'] = 1 : null;

        // Fetch user info
        $userres = $fdb->query('SELECT users.username, posts.post_time FROM '.$_SESSION['php'].'users AS users, '.$_SESSION['php'].$_SESSION['phpnuke'].'posts AS posts WHERE users.user_id=posts.poster_id AND posts.post_id='.$ob['forum_last_post_id']) or myerror("Unable to fetch user info for forum conversion.", __FILE__, __LINE__, $fdb->error());
        $userinfo = $fdb->fetch_assoc($userres);

        // Change last_post = 0 to null to prevent the time-bug.
        $userinfo['post_time'] == 0 ? $userinfo['post_time'] = 'null' : null;
        $ob['forum_last_post_id'] == 0 ? $ob['forum_last_post_id'] = 'null' : null;

        // Unset variables
        if(!isset($userinfo['username']))
            $userinfo['username'] = 'null';

        // Dataarray
        $todb = array(
            'id'                =>        $ob['forum_id'],
            'forum_name'    =>        $ob['forum_name'],
            'forum_desc'    =>        $ob['forum_desc'],
            'num_topics'    =>        $ob['forum_topics'],
            'num_posts'        =>        $ob['forum_posts'],
            'disp_position'=>        $ob['forum_order'],
            'last_poster'    =>        $userinfo['username'],
            'last_post_id'    =>        $ob['forum_last_post_id'],
            'last_post'        =>        $userinfo['post_time'],
            'cat_id'            =>        $ob['parent_id'],
        );

        // Save data
        insertdata('forums', $todb, __FILE__, __LINE__);
    }

    // We move all subforums into a new category: they'll have to be properly organized by hand
    $db->query('INSERT INTO '.$_SESSION['pun'].'categories (cat_name, disp_position) VALUES ("Subforums", 100)') or myerror('PunBB: Unable to create subforum category', __FILE__, __LINE__, $fdb->error());
    $db->query('UPDATE '.$_SESSION['pun'].'forums AS f LEFT JOIN '.$_SESSION['pun'].'categories AS c ON (f.cat_id = c.id) SET f.cat_id = '.$db->insert_id().' WHERE c.id IS NULL') or myerror('PunBB: Unable to move subforums to new category', __FILE__, __LINE__, $fdb->error());

    convredirect('forum_id', $_SESSION['phpnuke'].'forums', $last_id);

?>

1,874

(55 replies, posted in PunBB 1.2 discussion)

Yeah, I was thinking about that: let me see what I can do

1,875

(55 replies, posted in PunBB 1.2 discussion)

Oh
phpBB folder, forums.php
This is the new code:

<?php

    // Fetch forum info
    $result = $fdb->query('SELECT * FROM '.$_SESSION['php'].$_SESSION['phpnuke'].'forums WHERE forum_id>'.$start.' AND forum_type != 0 ORDER BY forum_id LIMIT '.$_SESSION['limit']) or myerror('phpBB: Unable to get table: forums', __FILE__, __LINE__, $fdb->error());
    $last_id = -1;
    while($ob = $fdb->fetch_assoc($result))
    {
        $last_id = $ob['forum_id'];
        echo $ob['forum_name'].' ('.$ob['forum_id'].")<br>\n"; flush();

        // Check for anonymous poster id problem
        $ob['forum_last_post_id'] == -1 ? $ob['forum_last_post_id'] = 1 : null;

        // Fetch user info
        $userres = $fdb->query('SELECT users.username, posts.post_time FROM '.$_SESSION['php'].'users AS users, '.$_SESSION['php'].$_SESSION['phpnuke'].'posts AS posts WHERE users.user_id=posts.poster_id AND posts.post_id='.$ob['forum_last_post_id']) or myerror("Unable to fetch user info for forum conversion.", __FILE__, __LINE__, $fdb->error());
        $userinfo = $fdb->fetch_assoc($userres);

        // Change last_post = 0 to null to prevent the time-bug.
        $userinfo['post_time'] == 0 ? $userinfo['post_time'] = 'null' : null;
        $ob['forum_last_post_id'] == 0 ? $ob['forum_last_post_id'] = 'null' : null;

        // Unset variables
        if(!isset($userinfo['username']))
            $userinfo['username'] = 'null';

        // Dataarray
        $todb = array(
            'id'                =>        $ob['forum_id'],
            'forum_name'    =>        $ob['forum_name'],
            'forum_desc'    =>        $ob['forum_desc'],
            'num_topics'    =>        $ob['forum_topics'],
            'num_posts'        =>        $ob['forum_posts'],
            'disp_position'=>        $ob['forum_order'],
            'last_poster'    =>        $userinfo['username'],
            'last_post_id'    =>        $ob['forum_last_post_id'],
            'last_post'        =>        $userinfo['post_time'],
            'cat_id'            =>        $ob['parent_id'],
        );

        // Save data
        insertdata('forums', $todb, __FILE__, __LINE__);
    }

    convredirect('forum_id', $_SESSION['phpnuke'].'forums', $last_id);

?>