[gelöst]Nach CrackerTrackerInstallation: Login nicht möglich

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
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.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
mattheXTC
Mitglied
Beiträge: 37
Registriert: 20.07.2006 18:57
Wohnort: Kaiserslautern
Kontaktdaten:

[gelöst]Nach CrackerTrackerInstallation: Login nicht möglich

Beitrag von mattheXTC »

Hallo!

Ich habe CrackerTracker installiert und wenn sich jetzt jemand einloggen will, kommt folgende Fehlermeldung:

Parse error: syntax error, unexpected T_STRING in /var/www/virtual/thepage.freeprojekt.de/forum/htdocs/login.php on line 81

Ich lade hier meine login.php hoch:
http://forum.thepage.freeprojekt.de/login.txt

Ich bitte um Hilfe, da ich selbst nicht mehr ins Forum komme und ehrlich gesagt nicht die ganze Mod nochmal deinstallieren will.

Vielen Dank im Voraus!

MfG
Zuletzt geändert von mattheXTC am 27.07.2006 10:59, insgesamt 1-mal geändert.
SoLo1905

Beitrag von SoLo1905 »

Zeile81: normal login without any Confirmation ???

gehört den das auch rein

Code: Alles auswählen

let's do it ;-)
woher hast du den mod leg mal ein download link rein

danke
mattheXTC
Mitglied
Beiträge: 37
Registriert: 20.07.2006 18:57
Wohnort: Kaiserslautern
Kontaktdaten:

Beitrag von mattheXTC »

Hier der Download-link der MOD:

http://www.phpbb.de/moddb/crack_track

Ich hoffe jemand kann mir helfen!

Danke!

MfG
Benutzeravatar
kazwo
Mitglied
Beiträge: 934
Registriert: 29.07.2005 14:10
Wohnort: Mutterstadt des deutschen Fußballs

Beitrag von kazwo »

Such mal

Code: Alles auswählen

//
			// CBACK CrackerTracker Visual Login Confirmation
			// visual confirmation code Generator taken from phpBB (c) phpBB Group
			//
			if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
			{
				$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] 

: $HTTP_POST_VARS['mode'];
				$mode = htmlspecialchars($mode);

				if ( $mode == 'confirm' )
				{
					if ( $userdata['session_logged_in'] )
					{
						exit;
					}
					include($phpbb_root_path . 'ctracker/ct_confirm.'.$phpEx);
					exit;
			    }
			}

			//
			// Now we check if the User is trying to Log in if he already has used one 

attempt or not
			// if not we disable the Visual Confirmation Code and with this we allow a 

normal login without any Confirmation
			// if the User tried to log in once we just continue with the normal 

Script and then we show the Visible Code every time the user
			// tries to log in before checking Password or anything.
			// Well OK its more DB gaming but many users want comfort AND security so 

let's do it ;-)
			//
			if(!empty($HTTP_POST_VARS['username']) && $ctracker_config['loginfeature'] 

== 1)
			{
			  $secure_username = '';
			  $secure_username = isset($HTTP_POST_VARS['username']) ? 

phpbb_clean_username($HTTP_POST_VARS['username']) : '';
			  $sql = "SELECT ct_logintry FROM " . USERS_TABLE . " WHERE username = '" 

. str_replace("\\'", "''", $secure_username) . "'";
			  if ( !($result = $db->sql_query($sql)) )
			  {
			    message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', 

__LINE__, __FILE__, $sql);
			  }
			  if( $row = $db->sql_fetchrow($result) )
		      {
			    if($row['ct_logintry'] == 0)
				{
				  $ctracker_config['loginfeature'] = 0;
				}
		      } 
			}
			else
			{
			  $ctracker_config['loginfeature'] = 0;
			}

            if ( $ctracker_config['loginfeature'] == 1 && !$userdata['session_logged_in'] && 

!empty($HTTP_POST_VARS['confirm_id']) && !empty($HTTP_POST_VARS['confirm_code']))
			{
                    $confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);			

		if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
					{
						$confirm_id = '';
					}

					$sql = 'SELECT code
						FROM ' . CTVISKEY . "
						WHERE confirm_id = '$confirm_id'
							AND session_id = '" . 

$userdata['session_id'] . "'";
					if (!($result = $db->sql_query($sql)))
					{
						message_die(GENERAL_ERROR, 'Could not obtain 

confirmation code', __LINE__, __FILE__, $sql);
					}

					if ($row = $db->sql_fetchrow($result))
					{
						if ($row['code'] != 

$HTTP_POST_VARS['confirm_code'])
						{
                            message_die(GENERAL_MESSAGE, $lang['ct_forum_sl1']);
						}
						else
						{
							$sql = 'DELETE FROM ' . CTVISKEY . "
								WHERE confirm_id = '$confirm_id'
									AND session_id = '" . 

$userdata['session_id'] . "'";
							if (!$db->sql_query($sql))
							{
								message_die(GENERAL_ERROR, 'Could 

not delete confirmation code', __LINE__, __FILE__, $sql);
							}
						}
					}
					else
					{
                            message_die(GENERAL_MESSAGE, $lang['ct_forum_sl1']);
					}
					$db->sql_freeresult($result);
			}

            $vcheck_need  = FALSE;
            $vcheck_login = TRUE;
            if($ctracker_config['loginfeature'] == 1 )
            {
              $vcheck_need = TRUE;
              $vcheck_login = FALSE;
            }

            if (($vcheck_need = FALSE || $userdata['session_logged_in']) or 

(isset($HTTP_GET_VARS['logout']) || !empty($HTTP_POST_VARS['confirm_id']) && 

!empty($HTTP_POST_VARS['confirm_code'])))
		  	{
			  $vcheck_login = TRUE;
		  	}
und ersetze mit

Code: Alles auswählen

//
			// CBACK CrackerTracker Visual Login Confirmation
			// visual confirmation code Generator taken from phpBB (c) phpBB Group
			//
			if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
			{
				$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
				$mode = htmlspecialchars($mode);

				if ( $mode == 'confirm' )
				{
					if ( $userdata['session_logged_in'] )
					{
						exit;
					}
					include($phpbb_root_path . 'ctracker/ct_confirm.'.$phpEx);
					exit;
			    }
			}

			//
			// Now we check if the User is trying to Log in if he already has used one attempt or not
			// if not we disable the Visual Confirmation Code and with this we allow a normal login without any Confirmation
			// if the User tried to log in once we just continue with the normal Script and then we show the Visible Code every time the user
			// tries to log in before checking Password or anything.
			// Well OK its more DB gaming but many users want comfort AND security so let's do it ;-)
			//
			if(!empty($HTTP_POST_VARS['username']) && $ctracker_config['loginfeature'] == 1)
			{
			  $secure_username = '';
			  $secure_username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
			  $sql = "SELECT ct_logintry FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\\'", "''", $secure_username) . "'";
			  if ( !($result = $db->sql_query($sql)) )
			  {
			    message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
			  }
			  if( $row = $db->sql_fetchrow($result) )
		      {
			    if($row['ct_logintry'] == 0)
				{
				  $ctracker_config['loginfeature'] = 0;
				}
		      } 
			}
			else
			{
			  $ctracker_config['loginfeature'] = 0;
			}

            if ( $ctracker_config['loginfeature'] == 1 && !$userdata['session_logged_in'] && !empty($HTTP_POST_VARS['confirm_id']) && !empty($HTTP_POST_VARS['confirm_code']))
			{
                    $confirm_id = htmlspecialchars($HTTP_POST_VARS['confirm_id']);					if (!preg_match('/^[A-Za-z0-9]+$/', $confirm_id))
					{
						$confirm_id = '';
					}

					$sql = 'SELECT code
						FROM ' . CTVISKEY . "
						WHERE confirm_id = '$confirm_id'
							AND session_id = '" . $userdata['session_id'] . "'";
					if (!($result = $db->sql_query($sql)))
					{
						message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
					}

					if ($row = $db->sql_fetchrow($result))
					{
						if ($row['code'] != $HTTP_POST_VARS['confirm_code'])
						{
                            message_die(GENERAL_MESSAGE, $lang['ct_forum_sl1']);
						}
						else
						{
							$sql = 'DELETE FROM ' . CTVISKEY . "
								WHERE confirm_id = '$confirm_id'
									AND session_id = '" . $userdata['session_id'] . "'";
							if (!$db->sql_query($sql))
							{
								message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
							}
						}
					}
					else
					{
                            message_die(GENERAL_MESSAGE, $lang['ct_forum_sl1']);
					}
					$db->sql_freeresult($result);
			}

            $vcheck_need  = FALSE;
            $vcheck_login = TRUE;
            if($ctracker_config['loginfeature'] == 1 )
            {
              $vcheck_need = TRUE;
              $vcheck_login = FALSE;
            }

            if (($vcheck_need = FALSE || $userdata['session_logged_in']) or (isset($HTTP_GET_VARS['logout']) || !empty($HTTP_POST_VARS['confirm_id']) && !empty($HTTP_POST_VARS['confirm_code'])))
		  	{
			  $vcheck_login = TRUE;
		  	}
Blau-Gelb ist nicht Ikea und auch nicht die FDP. Blau-Gelb, das ist die Mannschaft, die ich so gern spielen seh.
mattheXTC
Mitglied
Beiträge: 37
Registriert: 20.07.2006 18:57
Wohnort: Kaiserslautern
Kontaktdaten:

Beitrag von mattheXTC »

Jetzt bekomme ich die gleiche Fehlermeldung, nur mit einer anderen Zeilenangabe:

Parse error: syntax error, unexpected T_STRING in /var/www/virtual/thepage.freeprojekt.de/forum/htdocs/login.php on line 104/u]

Ich habe die neue login.php wieder hochgeladen:

http://forum.thepage.freeprojekt.de/login2.txt

Ich bitte weiterhin um Hilfe!

MfG
Benutzeravatar
kazwo
Mitglied
Beiträge: 934
Registriert: 29.07.2005 14:10
Wohnort: Mutterstadt des deutschen Fußballs

Beitrag von kazwo »

Suche

Code: Alles auswählen

if ($row['user_id'] != ANONYMOUS)
					{
						$sql = 'UPDATE ' . USERS_TABLE . '
							SET ct_logintry = 1
							WHERE user_id = ' . $row['user_id'];
  	    					
						if( !$db->sql_query($sql))
  	    					{
	    					  message_die(CRITICAL_ERROR, "Could not perform 

Database operation", "", __LINE__, __FILE__, $sql);
          					}
					}
ersetze mit

Code: Alles auswählen

if ($row['user_id'] != ANONYMOUS)
					{
						$sql = 'UPDATE ' . USERS_TABLE . '
							SET ct_logintry = 1
							WHERE user_id = ' . $row['user_id'];
  	    					
						if( !$db->sql_query($sql))
  	    					{
	    					  message_die(CRITICAL_ERROR, "Could not perform Database operation", "", __LINE__, __FILE__, $sql);
          					}
					}
irgendwie sind da Absätze reingekommen, die da nicht reingehören.
Abgesehen davon, sieht das richtig aus....Probier das nochmal, wenns nich hilft, sag bescheid
Blau-Gelb ist nicht Ikea und auch nicht die FDP. Blau-Gelb, das ist die Mannschaft, die ich so gern spielen seh.
mattheXTC
Mitglied
Beiträge: 37
Registriert: 20.07.2006 18:57
Wohnort: Kaiserslautern
Kontaktdaten:

Beitrag von mattheXTC »

Ich habe die Änderung durchgeführt, aber der Fehler ist der gleiche! :(

Ich hoffe, dass du mir weiterhin hilfst; und wenn du noch andere Dateien brauchst, sag bescheid!

Danke!

MfG
Benutzeravatar
kazwo
Mitglied
Beiträge: 934
Registriert: 29.07.2005 14:10
Wohnort: Mutterstadt des deutschen Fußballs

Beitrag von kazwo »

Probiers mal hiermit

*nichtmehrvorhanden*
Zuletzt geändert von kazwo am 27.07.2006 12:24, insgesamt 1-mal geändert.
Blau-Gelb ist nicht Ikea und auch nicht die FDP. Blau-Gelb, das ist die Mannschaft, die ich so gern spielen seh.
mattheXTC
Mitglied
Beiträge: 37
Registriert: 20.07.2006 18:57
Wohnort: Kaiserslautern
Kontaktdaten:

Beitrag von mattheXTC »

Vielen herzlichen Dank, der Login funktioniert mit der neuen login.php wieder einwandfrei!

Vielen Dank für die tolle Hilfe!

MfG
Antworten

Zurück zu „phpBB 2.0: Mod Support“