Miro99 hat geschrieben:Danke, hat beinahe problemlos funktioniert.
Nach den Codechanges 2.0.8 -> 2.0.10 kam im Administrationsbereich dann die Meldung:
Couldn't obtain guest user/online information.
DEBUG MODE
SQL Error : 1109 Unknown table 's' in where clause
SELECT session_page, session_logged_in, session_time, session_ip, session_start FROM phpbb_sessions WHERE session_logged_in = 0 AND s.session_time >= 1106169044 ORDER BY session_time DESC
Line : 350
File : /www0170/
www.grazer-elefants.at/forum/admin/index.php
Line 350:
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql);
Ich habe (warum auch immer) ein paar Einträge zuvor die common.php gepostet... Hier ein Auszug aus der admin/index.php ! Möchte dieses Problem zuerst beheben, bevor ich auf 2.0.12 update!
Code: Alles auswählen
//
// Get users online information.
//
$sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, s.session_logged_in, s.session_ip, s.session_start
FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s
WHERE s.session_logged_in = " . TRUE . "
AND u.user_id = s.session_user_id
AND u.user_id <> " . ANONYMOUS . "
AND u.user_session_time >= " . ( time() - 300 ) . "
ORDER BY u.user_session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_reg = $db->sql_fetchrowset($result);
$sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start
FROM " . SESSIONS_TABLE . "
WHERE session_logged_in = 0
AND s.session_time >= " . ( time() - 300 ) . "
ORDER BY session_time DESC";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain guest user/online information.", "", __LINE__, __FILE__, $sql);
}
$onlinerow_guest = $db->sql_fetchrowset($result);
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if($forums_result = $db->sql_query($sql))
{
while($forumsrow = $db->sql_fetchrow($forums_result))
{
$forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql);
}
$reg_userid_ary = array();
if( count($onlinerow_reg) )
{
$registered_users = 0;
for($i = 0; $i < count($onlinerow_reg); $i++)
{
if( !inarray($onlinerow_reg[$i]['user_id'], $reg_userid_ary) )
{
$reg_userid_ary[] = $onlinerow_reg[$i]['user_id'];
$username = $onlinerow_reg[$i]['username'];
if( $onlinerow_reg[$i]['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$registered_users++;
$hidden = FALSE;
}
else
{
$hidden_users++;
$hidden = TRUE;
}
if( $onlinerow_reg[$i]['user_session_page'] < 1 )
{
switch($onlinerow_reg[$i]['user_session_page'])
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_LOGIN:
$location = $lang['Logging_on'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_SEARCH:
$location = $lang['Searching_forums'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
$location_url = "index.$phpEx?pane=right";
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;