Server wird lahmgelegt :(

Eine Neuinstallation von phpBB 2.0 wird auf phpBB.de nicht mehr unterstützt.
Siehe auch Entwicklungs-Ende von phpBB 2.0 - Auswirkungen auf phpBB.de
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.

Eine Neuinstallation von phpBB 2.0 wird auf phpBB.de nicht mehr unterstützt.
Siehe auch Entwicklungs-Ende von phpBB 2.0 - Auswirkungen auf phpBB.de
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

aktivier es nochmals bitte
CyberCopGER
Mitglied
Beiträge: 6
Registriert: 29.03.2005 05:29

Beitrag von CyberCopGER »

wenn ich das aktiviert ist das forum bei erstem aufruf lahm gelegt...

hast du ICQ das wird das absrepchen können? damit ich das zugelich weider stabilisieren kann...

meine ICQ: 161384338

oder ahst du vielleicht IRC?
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

irc.st-city.net raum #help :wink:
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

Also ich habe mir das angeschaut und bin nun am verzweifeln.
folgender code wird verwendet um die RECHTE auszulesen:

Code: Alles auswählen

$sql = "SELECT post_id FROM " . POSTS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql);
}
$recent_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
	$recent_ids[] = $row['post_id'];
}
$db->sql_freeresult($result);

$recent_forum = ( isset($HTTP_POST_VARS['forum']) ) ? intval($HTTP_POST_VARS['forum']) : -1;
if ( $recent_forum == -1 )
{
        $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
        $ignore_forum_sql = '';
        while( list($key, $value) = each($is_auth_ary) )
        {
                if ( !$value['auth_read'] )
                {
                        $ignore_forum_sql .= ( ( $ignore_forum_sql != '' ) ? ', ' : '' ) . $key;
                }
        }
        if ( $ignore_forum_sql != '' )
        {
                $auth_sql .= ( $auth_sql != '' ) ? " AND f.forum_id NOT IN ($ignore_forum_sql) " : "f.forum_id NOT IN ($ignore_forum_sql) ";
        }
}
                if ( $recent_author == '' && $auth_sql == '' )
                {
                        $sql = "SELECT topic_id FROM " . POSTS_TABLE . "
                                WHERE post_id IN (" . implode(", ", $recent_ids) . ")
                                $where_sql GROUP BY topic_id";
                }
                else
                {
                        $from_sql = POSTS_TABLE . " p";
                        if ( $auth_sql != '' )
                        {
                                $from_sql .= ", " . FORUMS_TABLE . " f";
                                $where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
                        }
                        $sql = "SELECT p.topic_id FROM $from_sql
                                WHERE p.post_id IN (" . implode(", ", $recent_ids) . ")
                                $where_sql GROUP BY p.topic_id";
                }
                if ( !($result = $db->sql_query($sql)) )
                {
                       // message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql);
                }

                $recent_ids = array();
                while( $row = $db->sql_fetchrow($result) )
                {
                        $recent_ids[] = $row['topic_id'];
                }
                $db->sql_freeresult($result);
Das finde ich nen bißchen arg heftig.. besonders sind da funktionen die nie gebraucht werden :o Meiner Meinung nach reicht folgendes:

Code: Alles auswählen

$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
$auth_results = '';
while( list($key, $value) = each($is_auth_ary) )
{
  if ( $value['auth_read'] )
  {
      $auth_results .= ( ( $auth_results != '' ) ? ', ' : '' ) . $key;
  }
}
Stimmt das so? Denn nun habe ich das problem das die neusten beiträge ne falsche reihenfolge haben...

Code: Alles auswählen

$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
        FROM ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u, ". POSTS_TABLE ." p, ". POSTS_TABLE ." p2, ". USERS_TABLE ." u2
        WHERE t.topic_id IN ($auth_results)
              AND t.topic_poster = u.user_id
              AND f.forum_id = t.forum_id
              AND p.post_id = t.topic_first_post_id
              AND p2.post_id = t.topic_last_post_id
              AND u2.user_id = p2.poster_id
        ORDER BY t.topic_last_post_id DESC LIMIT $limit";
Ich bekomme aber auch irgendwie nie die richtige hin :roll:
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Beitrag von Dave »

^^ help ^^
Benutzeravatar
m0bby
Mitglied
Beiträge: 82
Registriert: 23.03.2004 13:19
Kontaktdaten:

Beitrag von m0bby »

Hallo zusammen,

mit den LAST TOPICS aus dem AWSW Intro kämfe ich auch gerade...
Die Serverlast wird exterem hoch, wenn man viele Beiträge im Forum hat, da die SQL-Queries nicht gerade optimal programmiert sind. :-?

Hat schon jemand eine Lösung gefunden?



Schönen Gruß
mObbY
Benutzeravatar
m0bby
Mitglied
Beiträge: 82
Registriert: 23.03.2004 13:19
Kontaktdaten:

Beitrag von m0bby »

Hallo,

keine Antwort?
Ok, antworte ich mir halt selber.. ;)

Ich habe das Problem gelöst (naja entschärft) indem ich die Zeile

Code: Alles auswählen

$sql = "SELECT post_id FROM " . POSTS_TABLE;
durch diese ersetzt habe

Code: Alles auswählen

$sql = "SELECT post_id FROM " . POSTS_TABLE . "
                           ORDER BY post_time DESC
                           LIMIT " . $limit * 50;
Ich gehe bei diesem Ansatz davon aus, dass unter den letzten $limit * 50 Beiträgen ausreichend öffentlich lesbare Beiträge sind, um in der Liste angezeigt zu werden.


Schönen Gruß
mObbY
Gesperrt

Zurück zu „phpBB 2.0: Installation und Update“