Installation problemlos, dann dieser SQL-Fehler

Probleme bei der regulären Arbeiten mit phpBB, Fragen zu Vorgehensweisen oder Funktionsweise sowie sonstige Fragen zu phpBB im Allgemeinen.
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.
Antworten
Gab01
Mitglied
Beiträge: 3
Registriert: 02.04.2009 22:33

Installation problemlos, dann dieser SQL-Fehler

Beitrag von Gab01 »

Hallo zusammen! :)

Ich bin an eine 2er Version des phpBB gekommen, weil ich mir bei Heise das i-study_1.6.3 (online-Seminar-Plattform) runtergeladen habe, das auf der Version 2.0.13 des phpBB aufgebaut ist.

Die Installation verlief absolut problemlos.
Als ich jedoch die vorhandenen Foren bearbeiten und neue erstellen wollte, bekam ich folgende Fehlermeldung:
Could not obtain recent topic information

DEBUG MODE

SQL Error : 1054 Unknown column 't.forum_id' in 'on clause'

SELECT t.*, 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 forum_topics t, forum_users u, forum_posts p, forum_posts p2, forum_users u2 LEFT JOIN forum_forums f ON t.forum_id = f.forum_id WHERE t.topic_id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21) AND t.topic_poster = u.user_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 10

Line : 470
File : portal.php

Ich habe dann die portal.php geöffnet und fand in Zeile 470 folgendes:

Code: Alles auswählen

{ 
   message_die(GENERAL_ERROR, 'Could not obtain recent topic information', '', __LINE__, __FILE__, $sql); 
}

Von php habe ich leider keine Ahnung, ich habe das nie kapiert.
Kann mir evtl. von Euch jemand helfen, dem Fehler auf die Spur zu kommen?
Ich wäre Euch wahnsinnig dankbar, da ich diese Plattform dringend brauche.

Vielen lieben Dank und liebe Grüße,
Gab01 :)
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12179
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Re: Installation problemlos, dann dieser SQL-Fehler

Beitrag von Mahony »

Hallo
Schau mal hier Unknown column xxx' in 'on clause'

P.S. Der Fehler liegt in deiner portal.php



Grüße: Mahony
Taekwondo in Berlin
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Gab01
Mitglied
Beiträge: 3
Registriert: 02.04.2009 22:33

Re: Installation problemlos, dann dieser SQL-Fehler

Beitrag von Gab01 »

Hallo Mahony,

zuerst einmal einen ganz lieben Dank für Deine superschnelle Antwort! :)

Im Großen und Ganzen habe ich verstanden, was gemeint ist, auch dass der Fehler in der portal.php behoben werden muss.
Da ich im MYSQL nichts kaputtmachen möchte, muss ich einfach nochmal nachfragen.

Der, bzw. die Fehler könnten eigentlich dann nur in diesem Abschnitt liegen:

Code: Alles auswählen

$sql = "SELECT t.*, 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, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
	LEFT JOIN " . FORUMS_TABLE . " f
		ON t.forum_id = f.forum_id
	WHERE t.topic_id IN ($auth_results)
		AND t.topic_poster = u.user_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 10"; 
if ( !($result = $db->sql_query($sql)) ) 
{ 
   message_die(GENERAL_ERROR, 'Could not obtain recent topic information', '', __LINE__, __FILE__, $sql); 
} 

while( $row = $db->sql_fetchrow($result) ) 
{
Wo genau aber müsste ich nun die Veränderungen machen?

Sorry, wenn ich blöd nachfrage, aber ich habe es mal geschafft eine MYSQL zu zersägen, weil ich einfach drauflosgeleegt habe, anstatt nochmal nachzufragen. Also bitte nicht böse sein, wenn ich mich jetzt etwas dumm anstelle.... :roll: :D :wink:
Benutzeravatar
Mahony
Ehemaliges Teammitglied
Beiträge: 12179
Registriert: 17.11.2005 22:33
Wohnort: Ostfildern Kemnat
Kontaktdaten:

Re: Installation problemlos, dann dieser SQL-Fehler

Beitrag von Mahony »

Hallo
Einfach den Part zwischen FROM und JOIN in Klammer () setzen (bei der SQL Abfrage).

Also das

Code: Alles auswählen

$sql = "SELECT t.*, 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, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
   LEFT JOIN " . FORUMS_TABLE . " f
      ON t.forum_id = f.forum_id
   WHERE t.topic_id IN ($auth_results)
      AND t.topic_poster = u.user_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 10";  
in das hier ändern

Code: Alles auswählen

$sql = "SELECT t.*, 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, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 )
   LEFT JOIN " . FORUMS_TABLE . " f
      ON t.forum_id = f.forum_id
   WHERE t.topic_id IN ($auth_results)
      AND t.topic_poster = u.user_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 10";  
Grüße: Mahony
Taekwondo in Berlin
Wer fragt, ist ein Narr für fünf Minuten, wer nicht fragt, ist ein Narr für immer.
Gab01
Mitglied
Beiträge: 3
Registriert: 02.04.2009 22:33

Re: Installation problemlos, dann dieser SQL-Fehler

Beitrag von Gab01 »

Daaaaaaaaaanke!!!!!!!!! :grin:
Du bist genial, vielen lieben Dank für Deine Hilfe, es hat geklappt!!!! :grin:

Großes Lob!!!!!
Solch eine schnelle Hilfe hatte ich noch in keinem Forum!!!! :wink:


Liebe Grüße,
Gab01
Antworten

Zurück zu „phpBB 2.0: Administration, Benutzung und Betrieb“