Seite 1 von 2

Profileviews 1.0.2a MySQL ERROR

Verfasst: 13.01.2012 21:47
von laph
Hilfe,
und zwar wollte ich den MOD Profileviews 1.0.2a installieren und als ich die Installation mit
dem "install/index.php" runnen wollte bekomme ich eine Fehlermeldung:

Code: Alles auswählen

Allgemeiner Fehler
Index name 'phpbb_cwalkinsideprofile_views_profile_user_id' on table 'phpbb_cwalkinsideprofile_views' is too long. The maximum is 41 characters.
Dann wenn ich aufs Board gehen will und auf ein Profil klicke, bekomme ich das hier:

Code: Alles auswählen

Allgemeiner Fehler
SQL ERROR [ mysql4 ]

Tabelle 'usr_web553_3.phpbb_cwalkinsideprofile_views' existiert nicht [1146]

SQL

SELECT * FROM phpbb_cwalkinsideprofile_views WHERE profile_user_id = 54 AND viewer_user_id = 53

BACKTRACE

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_profileviews.php
LINE: 33
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/memberlist.php
LINE: 438
CALL: count_visit()

Ich verstehe langsam die Welt nicht mehr.

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 00:51
von Miriam
Was genau verstehst du nicht?

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 11:04
von laph
Was genau muss ich denn machen wenn es einfach nicht geht?

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 13:56
von Miriam
Ist dein Tabellenpräfix phpbb_cwalkinside?

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 14:04
von laph
jap das ist es.

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 15:43
von Miriam
Workaround:
finde in der /install/index.php (2mal)

Code: Alles auswählen

if (version_compare($config['version'], '3.0.4', '>' )) 
tausche aus gegen:

Code: Alles auswählen

if (version_compare($config['version'], '3.0.10', '>' )) 
//Jetzt muss ich erst mal schauen, wieso das nicht funzt... also so wie es der Autor vorgesehen hat.

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 16:20
von Mahony
Hallo
Miriam hat geschrieben://Jetzt muss ich erst mal schauen, wieso das nicht funzt... also so wie es der Autor vorgesehen hat.
Die Ursache steht doch in der Fehlermeldung
Index name 'phpbb_cwalkinsideprofile_views_profile_user_id' on table 'phpbb_cwalkinsideprofile_views' is too long. The maximum is 41 characters.
Der Index name ist zu lang.


@laph - Versuch mal folgendes:

Öffne die includes/db/db_tools.php

Suche

Code: Alles auswählen

/**
    * Function to prepare some column information for better usage
    * @access private
    */
    function sql_prepare_column_data($table_name, $column_name, $column_data)
    {
        if (strlen($column_name) > 30)
        {
            trigger_error("Column name '$column_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
        } 
Ersetze mit

Code: Alles auswählen

/**
    * Function to prepare some column information for better usage
    * @access private
    */
    function sql_prepare_column_data($table_name, $column_name, $column_data)
    {
        if (strlen($column_name) > 130)
        {
            trigger_error("Column name '$column_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
        } 

Suche

Code: Alles auswählen

/**
    * Add unique index
    */
    function sql_create_unique_index($table_name, $index_name, $column)
    {
        $statements = array();

        $table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
        if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
        {
            $max_length = strlen($table_prefix) + 24;
            trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
        } 
Ersetze mit

Code: Alles auswählen

/**
    * Add unique index
    */
    function sql_create_unique_index($table_name, $index_name, $column)
    {
        $statements = array();

        $table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
        if (strlen($table_name . $index_name) - strlen($table_prefix) > 124)
        {
            $max_length = strlen($table_prefix) + 24;
            trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
        } 
Suche

Code: Alles auswählen

/**
    * Add index
    */
    function sql_create_index($table_name, $index_name, $column)
    {
        $statements = array();

        $table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
        if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
        {
            $max_length = strlen($table_prefix) + 24;
            trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
        } 
Ersetze mit

Code: Alles auswählen

/**
    * Add index
    */
    function sql_create_index($table_name, $index_name, $column)
    {
        $statements = array();

        $table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
        if (strlen($table_name . $index_name) - strlen($table_prefix) > 124)
        {
            $max_length = strlen($table_prefix) + 24;
            trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
        } 
Danach solltest du die install/index.php verwenden können.

Achtung: Nachdem der MOD installiert wurde, solltest du die includes/db/db_tools.php wieder in den Original-Zustand versetzen! Also die Änderungen wieder rückgängig machen.

Grüße: Mahony

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 16:33
von Miriam
<offtopic>
  • Nur weil ich dazu
    laph hat geschrieben:Allgemeiner Fehler
    Index name 'phpbb_cwalkinsideprofile_views_profile_user_id' on table 'phpbb_cwalkinsideprofile_views' is too long. The maximum is 41 characters.
    nichts gesagt habe, heisst es nicht, dass ich es nicht gelesen / verstanden habe.

    Aber nichtsdestotrotz:

    Danke für den Hinweis ->
    Mahony hat geschrieben:Der Index name ist zu lang.
</offtopic>

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 17:37
von laph
Ja ich kann sie starten, dann steht bei mir "Upgrade!?" dann drücke ich upgrade und bekommen diese Fehlermeldung:

Code: Alles auswählen

Allgemeiner Fehler
SQL ERROR [ mysql4 ]

Tabelle 'usr_web553_3.phpbb_cwalkinsideprofile_views' existiert nicht [1146]

SQL

SELECT DISTINCT p.profile_user_id FROM phpbb_cwalkinsideprofile_views p LEFT JOIN phpbb_cwalkinsideusers u ON ( p.profile_user_id = u.user_id ) WHERE u.user_id IS NULL ORDER BY p.profile_user_id ASC

BACKTRACE

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: [ROOT]/install/index.php
LINE: 510
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/install/index.php
LINE: 191
CALL: delete_old_ids()
wenn ich dann aber wieder auf einen Benutzer drücken will, dann kommt diese Nachricht aus dem Profil:

Code: Alles auswählen

Allgemeiner Fehler
SQL ERROR [ mysql4 ]

Tabelle 'usr_web553_3.phpbb_cwalkinsideprofile_views' existiert nicht [1146]

SQL

SELECT * FROM phpbb_cwalkinsideprofile_views WHERE profile_user_id = 384 AND viewer_user_id = 53

BACKTRACE

FILE: [ROOT]/includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_profileviews.php
LINE: 33
CALL: dbal_mysql->sql_query()

FILE: [ROOT]/memberlist.php
LINE: 439
CALL: count_visit()

Re: Profileviews 1.0.2a MySQL ERROR

Verfasst: 14.01.2012 18:06
von Mahony
Hallo
Leg die Tabelle manuell an

Code: Alles auswählen

CREATE TABLE phpbb_cwalkinsideprofile_views (
	profile_user_id mediumint(8) UNSIGNED NOT NULL,
	viewer_user_id mediumint(8) UNSIGNED NOT NULL,
	viewer_user_counter mediumint(8) UNSIGNED NOT NULL,
	viewer_visit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
	KEY profile_user_id (profile_user_id),
	KEY viewer_user_id (viewer_user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
Edit: Siehe dazu auch KB:pma_faq

Grüße: Mahony