1 (edited by bingiman 2007-07-03 01:15)

Topic: Problem when I view IP address

I am having a problem. When I click on the user ip address from the topic I get the following error:

An error was encountered
Error: Unable to fetch post info.

Here is the link so you can see what it is exactly.

http://shednotes.com/moderate.php?get_host=14

Please let me know if you can help me and I will give you admin access.

I even copied a fresh copy of moderate.php and it still doesn't work

Thanks for the help

Bingiman

Re: Problem when I view IP address

I tried to register at your site and got the same error. No reason (that I know of) registering should fetch any post info so I'm guessing it's something being loaded in a side block.

Re: Problem when I view IP address

could you post the query?

FluxBB - v1.4.8

Re: Problem when I view IP address

Maybe try debug mode?

5 (edited by bingiman 2007-07-03 09:44)

Re: Problem when I view IP address

I found the problem after just 4 hours of my time..:D

This is the problem here:

<div class="block">
        <h2 class="block2"><span>Top 10 Posts</span></h2>
        <div class="box">
            <div class="inbox">
                <ul>    
                   <?php
$trunc_len = 20; // Fill this in

$result = $db->query('SELECT subject, id FROM '.$db_prefix.'topics ORDER BY last_post DESC LIMIT 10') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

while($cur_topics = $db->fetch_assoc($result))
{
    
?>
<li><img style="vertical-align: middle;" src="img/icon_dot.gif" alt="" /> <a href="viewtopic.php?id=<?php echo $cur_topics['id']; ?>"><?php echo substr($cur_topics['subject'], 0, $trunc_len); ?>...</a></li>
<?php
}
?>
    </ul></div>
</div>
</div>

The above code resides in a file called: recenttopics.inc.php and you will notice that I have changed "topic" to "topics". I had to do this because there was a conflict using $cur_topic so I had to make it $cur_topics instead. Once logged into the site it works great. However, it messes with quite a bit of options, such as maoderate.php (viewing users ip) and logging in as well. Does anyone know how I can resolve this issue?

Thanks
Bingiman

Re: Problem when I view IP address

Tried to register again and still getting the same error when submitting. Like Burnsy86 mentioned debug mode would be a big help.

Re: Problem when I view IP address

Actually, I found the problem. It is the <include recenttopics.inc.php> that file is causing the error. I just haven't updated the site yet. I was just doing some mods to the whole site. Anyway, I don't have a solution to the above mentioned problem. I posted the code above but I am lost as to why it is causing these errors.