MyBB Community Forums

Full Version: Wierd Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Here's the function:

// Jump to the last post.
if($mybb->input['action'] == "lastpost")
{
if(strstr($thread['closed'], "moved|"))
{
$query = $db->query("
SELECT p.pid
FROM ".TABLE_PREFIX."posts p, ".TABLE_PREFIX."threads t
WHERE t.fid='".$thread['fid']."' AND t.closed NOT LIKE 'moved|%' AND p.tid=t.tid
ORDER BY p.dateline DESC
LIMIT 0, 1
");
$pid = $db->fetch_field($query, "pid");
}
else
{
$options = array(
'order_by' => 'dateline',
'order_dir' => 'desc',
'limit_start' => 0,
'limit' => 1
);
$query = $db->simple_select(TABLE_PREFIX.'posts', 'pid', "tid={$tid}", $options);
$pid = $db->fetch_field($query, "pid");
}
header("Location:showthread.php?tid={$tid}&pid={$pid}#pid{$pid}");
exit;
}
I don't see anything out of the ordinary in this portion of the script...
Then its your server.
The host hasn't made any changes to the server at all. It is IIS7. It was working fine until I did the upgrade the second time.
Have you tried backing up your database then making a fresh install on a fresh database and then importing the backup?
I have and it does look like there is a problem within the forum files:
2008-01-22 19:34:17 127.0.0.1 GET /showthread.php tid=1&action=lastpost 85 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.0.04506;+.NET+CLR+1.1.4322) 302 0 0
2008-01-22 19:34:17 127.0.0.1 GET /howthread.php tid=1&pid=4 85 - 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.0.04506;+.NET+CLR+1.1.4322) 404 0 2
Where can I download a pre1.2.12 version? I'll just do a quick check to see if it is the files or my server.
Pages: 1 2