Seite 1 von 1

toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 18:29
von Maggan22
Hallo zusammen,

ich habe mir folgenden Hack besorgt toplist_hack_1.3.8, ihn eingebaut aber mit der sqldatei stimmt was nicht. Es gibt Fehlermeldungen und ich hab nun schon ganz lange rumprobiert und gegooglet, ich kann die Fehlenden Tabellen einfach nicht richtig einsetzen.

Vielleicht kann mir hier wer weiterhelfen *hoff*

Code: Alles auswählen

<?
/***************************************************************************
 *                                toplist_install.php
 *                            -------------------
 *   begin                : 2003/01/25
 *   copyright            : (C) 2003 Cees-Jan Kiewiet
 *   email                : webmaster@wyrihaximus.net
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); 
include($phpbb_root_path . 'mods/toplist_mod/toplist_common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, 0);
init_userprefs($userdata);
//
// End session management
//

if( !$userdata['session_logged_in'] )
{
	header('Location: ' . append_sid("login.$phpEx?redirect=toplist_install.$phpEx", true));
}

if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

$pre_table_list = mysql_list_tables($dbname);

while($row = mysql_fetch_row($pre_table_list))
{
	$table_list[] = $row[0];
}

if(in_array("toplist",$table_list))
{
	$sql_array[] = "ALTER TABLE toplist RENAME " . TOPLIST_TABLE;
}
elseif(in_array(TOPLIST_TABLE,$table_list))
{
	//
	// I'm bored I have nothing to do :P
	//
}
else
{
	$sql_array[] = "CREATE TABLE " . TOPLIST_TABLE . " (id int(255) NOT NULL auto_increment, nam varchar(255) NOT NULL default '', inf varchar(255) NOT NULL default '', " . HIN . " int(255) NOT NULL default '0', lin varchar(255) NOT NULL default '', " . OUT . " int(255) NOT NULL default '0', " . IMG . " int(255) NOT NULL default '0', ban varchar(255) NOT NULL default 'http://', owner int(255) NOT NULL default '0', tot int(255) NOT NULL default '0', imgfile varchar(50) NOT NULL default 'button1', PRIMARY KEY  (id)) TYPE=MyISAM";
}

if(!in_array(TOPLIST_ANTI_FLOOD_TABLE,$table_list))
{
	$sql_array[] = "CREATE TABLE " . TOPLIST_ANTI_FLOOD_TABLE . " (id INT( 255 ) NOT NULL ,ip VARCHAR( 8 ) NOT NULL ,time INT( 11 ) NOT NULL ,type VARCHAR( 3 ) NOT NULL ) TYPE=MyISAM";
}

$ip_field = false;
$result = $db->sql_query("SHOW FIELDS FROM " . TOPLIST_TABLE);
while($row = $db->sql_fetchrow($result))
{
	if($row['Field']=='ip')
	{
		$ip_field = true;
	}
}

if(!$ip_field)
{
	$sql_array[] = "ALTER TABLE " . TOPLIST_TABLE . " ADD ip VARCHAR( 8 ) NOT NULL";
}

config_sql('toplist_button_1', '', false);
config_sql('toplist_button_2', '', false);
config_sql('toplist_button_1_l', '', false);
config_sql('toplist_button_2_l', '', false);
config_sql('toplist_imge_dis', 5, false);
config_sql('toplist_view_' . HIN . '_hits', 1, false);
config_sql('toplist_view_' . OUT . '_hits', 1, false);
config_sql('toplist_view_' . IMG . '_hits', 1, false);
config_sql('toplist_dimensions', '', false);
config_sql('toplist_prune_' . IMG . '_hits_interval', 0, false);
config_sql('toplist_prune_' . IMG . '_hits_last', time(), false);
config_sql('toplist_prune_' . HIN . '_hits_interval', 0, false);
config_sql('toplist_prune_' . HIN . '_hits_last', time(), false);
config_sql('toplist_prune_' . OUT . '_hits_interval', 0, false);
config_sql('toplist_prune_' . OUT . '_hits_last', time(), false);
config_sql('toplist_anti_flood_' . OUT . '_hits_interval', 0, false);
config_sql('toplist_anti_flood_' . HIN . '_hits_interval', 0, false);
config_sql('toplist_anti_flood_' . IMG . '_hits_interval', 0, false);
config_sql('toplist_toplist_top10',0, false);
config_sql('toplist_count_hin_hits', 1, false);
config_sql('toplist_count_img_hits', 1, false);
config_sql('toplist_count_out_hits', 1, false);
config_sql('toplist_hin_activation', 0, false);
config_sql('toplist_version', '1.3.8', true);


$sql_count = count($sql_array);

for($i = 0; $i < $sql_count; $i++)
{
	$message .= "Running :: " . $sql_array[$i];

	if ( !$db->sql_query($sql_array[$i]) )
	{
		$errored = true;
		$error = $db->sql_error();
		$message .= " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />\n\n";
	}
	else
	{
		$message .= " -> <b>COMPLETED</b><br /><br />\n\n";
	}
}

if( $errored )
{
	$message .= "Some of the querys have failed, contact me so I can fix the errors.";
}
else
{
	if(@unlink(__FILE__))
	{
		$message .= (($sql_count==0) ? "No database updates where needed." : " The database has been updated successfully.") . " This file has been deleted.";
	}
	else
	{
		$message .= (($sql_count==0) ? "No database updates where needed." : " The database has been updated successfully.") . " This file must be deleted.";
	}
}

message_die(GENERAL_MESSAGE, $message);
?>
das ist der Inhalt der install datei. Probleme gab es beim erstellen der phpbb_toplist tabelle und bei dem Befehl: Running :: ALTER TABLE phpbb_toplist ADD ip VARCHAR( 8 ) NOT NULL

Es handelt sich um folgendes Forum:
http://www.familybasar.bplaced.de/phpBB2/index.php

dort ist nun auch eine Fehlermeldung zu sehen!

Danke schonmal für die Hilfe

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 21:27
von dagobert50gold
Hast du die aktuellste MySQL-Version?

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 21:41
von Maggan22
die 5er?

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 21:48
von dagobert50gold
5.1.48 ist die aktuellste.

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 22:44
von Maggan22
5.1.46 hab ich

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 22:50
von dagobert50gold
Meine Vermutung ist sogar, dass phpBB2 nicht immer mit den neuen MySQLs funktioniert. Wie wenn man heutzutage noch ein phpBB 1.0 laufen lässt; Es funktioniert einfach nicht mehr richtig.

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 25.07.2010 23:16
von Maggan22
Bisher hat soweit alles geklappt
ohne probleme
es scheint tatsächlich ein Fehler in der sql datei zu sein

Meldung wenn ich die install ausführe ist diese:

Code: Alles auswählen

Running :: CREATE TABLE phpbb_toplist (id int(255) NOT NULL auto_increment, nam varchar(255) NOT NULL default '', inf varchar(255) NOT NULL default '', hin int(255) NOT NULL default '0', lin varchar(255) NOT NULL default '', out int(255) NOT NULL default '0', img int(255) NOT NULL default '0', ban varchar(255) NOT NULL default 'http://', owner int(255) NOT NULL default '0', tot int(255) NOT NULL default '0', imgfile varchar(50) NOT NULL default 'button1', PRIMARY KEY (id)) TYPE=MyISAM -> FAILED ---> 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 'out int(255) NOT NULL default '0', img int(255) NOT NULL default '0', ban varcha' at line 1

Running :: CREATE TABLE phpbb_toplist_anti_flood (id INT( 255 ) NOT NULL ,ip VARCHAR( 8 ) NOT NULL ,time INT( 11 ) NOT NULL ,type VARCHAR( 3 ) NOT NULL ) TYPE=MyISAM -> COMPLETED

Running :: ALTER TABLE phpbb_toplist ADD ip VARCHAR( 8 ) NOT NULL -> FAILED ---> Table 'familybasar.phpbb_toplist' doesn't exist

Running :: UPDATE phpbb_config SET config_value = '1.3.8' WHERE config_name = 'toplist_version' -> COMPLETED

Some of the querys have failed, contact me so I can fix the errors.
Ist der Fehler wirklich aufgetreten weil ich eine hoghe mysql Version habe?

Wie gesagt, alles andere geht ja wie man in der Medung sieht bis auf den Teil der in die phpbb_toplist tabelle geschrieben werden soll - was ja nicht geht weil sie nicht erstellt wurde.
Erstelle ich die Tabelle manuell wird auch der Teil ausgeführt, nur fehlen dann immernoch Einträge. Da ich mich nicht so auskenne weiß ich nicht was und wie ich es in die phpbb_toplist tabelle eintragen muß!

Re: toplist_hack_1.3.8 Fehlermeldung

Verfasst: 26.07.2010 19:06
von dagobert50gold
Some of the querys have failed, contact me so I can fix the errors.
... steht in dem Fehlercode.
Da ist also anscheinend ein Fehler im Mod.
* copyright : (C) 2003 Cees-Jan Kiewiet
* email : webmaster@wyrihaximus.net
EDIT: Anscheinend wird der Mod unter phpBB2 nicht unterstützt: http://wyrihaximus.net/projects/phpbb3/toplist-mod-2-0/

Seltsam ist nur, dass es keinen Download-Link gibt?!