Seite 1 von 1

Kategorie Mod "Error in Posting"

Verfasst: 25.01.2003 14:16
von Bit-Racer.de
:cry:

Nachdem ich jetzt alle Beiträge dazu durchforstet habe (und das waren viele), mir aber nix geholfen hat, muss ich jetzt mal ein Posting zu meinem Problem machen. Ich habe den Kategorie Hack von Talun (http://talun.de/data/phpbbhacks/categorie_hack102.txt) eingebaut, auch die 103. Local auf meinem etwas älteren Apache läuft alles problemlos, überspiele ich die entsprechenden Dateien auf meinen Webserver geht in der irgendwo die $k_id verloren.

Beim Posten entseht folgende Fehlermeldung:
______________________________________________________
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ')' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id) VALUES ('dwq', 2, 1043582613, 1, 0, 0, 0, )

Line : 256
File : /srv/www/htdocs/phpBB2/includes/functions_post.php
______________________________________________________
Da sieht man ja schon, dass kein Wert für die k_id im INSERT BEfehl steht.
Deffiniere ich spassenshalber eine Zeile über dem SQL Befehl $k_id = 2;
Dann steht der Wert da und wird also eingetragen - dass funktioniert also - ist aber nicht sinn und zweck des ganzen. Irgendwo geht mir die k_id verloren und ich habe keinen blassen schimmer wo.

Setzt man die $k_id in Hochkommas '$k_id' kann man zwar wieder posten, aber es wird für k_id kein Wert in die DB geschrieben.

Wie gesagt, local bei mir geht es, das macht mich ja noch verrückter.
Hier mal Links zu den Dateien, die entscheidend sein müssten:

POSTING.PHP ->http://404terror.net/phpbb/posting.txt
FUNCTIONS_POST.PHP ->http://404terror.net/phpbb/functions_post.txt

Verfasst: 26.01.2003 02:43
von ChaoS
Da ich diesen feinen Hack auch eingebaut habe hier kurze Anleitung wie die functions.php lauten sollte...

SUCHE (in Zeile 265)

Code: Alles auswählen

$sql  = ( $mode != "editpost" ) ? "INSERT INTO 

ERSETZTE DURCH:

Code: Alles auswählen

$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $k_id)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote, k_id=$k_id WHERE topic_id = $topic_id";

Verfasst: 12.01.2008 14:27
von LOLRainbow
Ich grabe einfach mal nochmal dieses alte Thema aus.

Ich habe soeben auch diesen MOD eingebaut, und habe selbes Problem, wenn ich einen Beitrag schreiben will:
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id) VALUES ('zt', 2, 1200144209, 28, 0, 0, 0, )

Line : 453
File : functions_post.php
Hier nochmal der MOD: http://www.phpbbhacks.com/download/342

Und hier meine functions_post.php

Ich hab das schon so gemacht wie von ChaoS angeraten, der Fehler besteht jedoch weiterhin.

Verfasst: 12.01.2008 14:31
von Boecki91
Da ist ein Komma zu viel:

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id) VALUES ('zt', 2, 1200144209, 28, 0, 0, 0, ) 
Das kann verschiedene Ursachen haben, entweder Ihr habt den Mod falsch eingebaut oder Mod ist fehlerhaft.

Verlinke mal die betroffene Datei. KB:datei

Verfasst: 12.01.2008 14:40
von LOLRainbow
Boecki91 hat geschrieben:Da ist ein Komma zu viel:

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, k_id) VALUES ('zt', 2, 1200144209, 28, 0, 0, 0, ) 
wo?


Boecki91 hat geschrieben:Verlinke mal die betroffene Datei. KB:datei
Due functions_post.php ist oben verlinkt.

Verfasst: 18.01.2008 22:31
von LOLRainbow
push