I friend have noticed a relation with logging in from the script-archive or the article-system. When you log in from the forum or don't log in at all, everything works fine. But when you log in from the script-archive or the article-system, you get the error message.

Do you think of anything that could be wrong when you read this?

I have ran that command now, and I haven't got any error-message yet. I'll inform you if I get one.

How do I do that? Is that a command?

i NEARLY allways get that error. Thats the problem!

Do you thing that I have to upgrade?

If I paste that code just before, and then try to view the page I come to a page with this source:

<table class="pun_plain" cellspacing="1" cellpadding="4">
    <tr>
        <td style="width: 53%"><b><a href="index.php">Codeshack</a> / PHP</b></td>
        <td class="pun_right" style="width: 28%"> </td>
        <td class="pun_right" style="width: 19%; white-space: nowrap"><b><a href="post.php?fid=1">Skapa ny tråd</a></b></td>
    </tr>
</table>

<table class="pun_main" cellspacing="1" cellpadding="4">
    <tr class="pun_head">
        <td class="pun_head" style="width: 24px"> </td>
        <td class="pun_head" style="width: *; white-space: nowrap">Tråd</td>
        <td class="pun_head" style="width: 14%; white-space: nowrap">Skapare</td>
        <td class="pun_headcent" style="width: 7%; white-space: nowrap">Svar</td>
        <td class="pun_headcent" style="width: 7%; white-space: nowrap">Visningar</td>

        <td class="pun_head" style="width: 25%; white-space: nowrap">Senaste inlägget</td>
    </tr>
SELECT DISTINCT p.poster_id AS hasposted, t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM pun_topics AS t LEFT JOIN pun_posts AS p ON t.id=p.topic_id AND p.poster_id=1 WHERE t.id IN(0,6,14) ORDER BY sticky DESC, last_post DESC

I think somethings really outta order here wink

It says:

An error was encountered
File: /home/httpd/ws2464/codeshack.se/forum/viewforum.php
Line: 144

PunBB reported: Unable to fetch topic list for forum
Database reported: You have an error in your SQL syntax near 'WHERE t.id IN(0,6,14) ORDER BY sticky DESC, last_post DESC' at line 1 (Errno: 1064) 


On that line I have

$result = $db->query('SELECT DISTINCT p.poster_id AS hasposted, t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM
'.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p'.$useindex.' ON t.id=p.topic_id AND p.poster_id='.$cur_user['id'].' WHERE t.id IN('.$threadids.') ORDER BY sticky DESC, last_post DESC') or error('Unable to fetch topic list for forum', __FILE__, __LINE__, $db->error());
}

Hmm. okay.. Then I'm afraid I have to upgrade anyway..

Maybe. But If someone can help me to just make my version work, that would be much better.

I have modded it pretty much, so it would be good if i could use the same version as I use now.

How do I fix that?

My forum is located at http://www.codeshack.se/forum if you wanna look at it. You'll probalby get tha same error. I'm running version 1.0 RC 2 with Mysql.

Thanks

36

(8 replies, posted in PunBB 1.2 show off)

I'll give him a try smile

37

(8 replies, posted in PunBB 1.2 show off)

smile

But now I'm afraid that I have to upgrade PunBB to a newer version. I have big troubles with fetching the topic list hmm

38

(8 replies, posted in PunBB 1.2 show off)

Then all my edits will disapper... hmm

39

(10 replies, posted in PunBB 1.2 troubleshooting)

Now I got it right!
I used:

get_article = stripslashes($article->get_text());
$get_article = htmlspecialchars($get_article);
echo nl2br($get_article);

Thanks guys!

40

(10 replies, posted in PunBB 1.2 troubleshooting)

Ah, now everything is displayed in text. Even the <br>'s. How can I get around that?

41

(8 replies, posted in PunBB 1.2 show off)

thank you

42

(10 replies, posted in PunBB 1.2 troubleshooting)

I have text (and sometimes php-code) in a database.
I want to display the text and code, not run it.

Do you understand?

If I write:
echo "hej";
it displays "hej".

But if i write echo "<? echo\"hej\"; ?>";
it doesn't display <? echo "hej"; ?> it displays nothing!

Do you have any idea of what can be wrong?

Thank you!

43

(8 replies, posted in PunBB 1.2 show off)

Ofcourse I'm using PunBB on my website!

I just wantet to tell you that. wink

44

(10 replies, posted in PunBB 1.2 troubleshooting)

for me displayes

echo "<? echo \"test\"; ?>";

nothing.

What's wrong..?? :confused:

45

(10 replies, posted in PunBB 1.2 troubleshooting)

"bajs" is not a nice word! wink

I'll test what you just wrote. I really hope that it is not that easy! smile

46

(10 replies, posted in PunBB 1.2 troubleshooting)

How have you done for displaying php-code in the posts, instead of running it?

I have that problem in my articles.

Please tell me! smile

Hmm.. Now it works without I changing anything. I'll inform you if I get the same problem again.

I really don't know what exit() I stop at.. I know that it is in common.php the problem is, so I echoed the row number before every exit in that file, but when i try to log in, it doesnt echo anything!

But do I really need common.php?
And.. Can it matter that my file index.php lies in another folder?

I'm trying to do it another way now..

But after this require, the site doesn't load anymore.

define('PUN', 1);
if (defined('PUN')){
echo "defined";
}
require '../forum/include/common.php';

As you see I have defined PUN, but it makes no sense.
I come to an "exit".

Do you know how I shall do to fix it?

Hmmm... I allreay have a working login with sessions.
$_SESSION['sess_username'] is the username, and you use $cur_user['username'], aren't you?

So.. Maybe all I need to do is add some rows php with cinda...
$_SESSION['sess_user'] = $cur_user['username']
$_SESSION['status'] = $cur_user['status'] and so on?

In that case, what variables do I have to declare?

Hope you understand what I mean.
You know, I don't need to check if the password is OK and so on.