nach hack ->update ->nun 2 fehler im board

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.
namenloserposter
Mitglied
Beiträge: 93
Registriert: 04.08.2004 00:09

nach hack ->update ->nun 2 fehler im board

Beitrag von namenloserposter »

nabend :)
nachdem ich es durch abwesenheit verpennt hatte mein board zu updaten, wurde es gehackt. ich habe daraufhin alle updates gemacht und auf die neuste version gewächselt.
nun habe ich zwei probleme:

1. wenn man sich registrieren will und auf den button registrieren klickt kommt eine weisse seite mit dem tag:

Code: Alles auswählen

Parse error: parse error, unexpected $ in /home/www/htdocs/domain.de/forum/profile.php on line 131
2. wenn ich auf einen usernamen klicke kommt auch ein weisser screen mit:

Code: Alles auswählen

Parse error: parse error, unexpected $ in /home/www/htdocs/domain.de/forum/profile.php on line 131
kann mir jemand sagen was da falsch läuft ? :)

danke dafür schon mal :)

grüsse !!!
pandorra
Mitglied
Beiträge: 210
Registriert: 18.04.2005 17:45

Beitrag von pandorra »

du musst sinnlose $ zeichen in den betreffenden dateien und den jeweiligen zeilen löschen....
mit bissl überlegen klappts doch auch :/
jaaaa, kein englisch bla, dict.leo.org

sry, bin grad mies drauf und lass meinen frust an unschuldigen im inet ab ;)
namenloserposter
Mitglied
Beiträge: 93
Registriert: 04.08.2004 00:09

Beitrag von namenloserposter »

ok danke für die hilfe :)
die sache ist nur das ich absolut unfit in php bin :) habe alles immer nur anhand von tuts und so realisiert !
deswegen frage ich :)

aber danke trotz der schlechten laune :)
pandorra
Mitglied
Beiträge: 210
Registriert: 18.04.2005 17:45

Beitrag von pandorra »

das ist das problem :/
das hatte rein garnichts mit php zu tun...
wenn du über den zebrastreifen gehst musst dich ja auch nicht mit den vorschriften befassen,
wie selbige in welchem verfahren auf welche teerart aufgerbacht werden müssen
(scheiss beispiel, aber es zieht :D)
das war simples logisches denken und eine textdatei durchsuchen ;)
wenn es was mit php zu tun gehabt hätte,
hättest du das prob ja nicht beheben können ;)
namenloserposter
Mitglied
Beiträge: 93
Registriert: 04.08.2004 00:09

Beitrag von namenloserposter »

so :) aber welches von den: $
ist es denn ?

Code: Alles auswählen

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

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

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
	$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
	$sid = '';
}

//
// Set default email variables
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
	$chars = array( 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J',  'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T',  'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

	$max_chars = count($chars) - 1;
	srand( (double) microtime()*1000000);

	$rand_str = '';
	for($i = 0; $i < 8; $i++)
	{
		$rand_str = ( $i == 0 ) ? $chars[rand(0, $max_chars)] : $rand_str . $chars[rand(0, $max_chars)];
	}

	return ( $hash ) ? md5($rand_str) : $rand_str;
}
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//
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 == 'viewprofile' )
	{
		include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
		exit;
	}
	else if ( $mode == 'editprofile' || $mode == 'register' )
	{
		if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
		{
			redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
		}

	 else if ( $mode == 'confirm' )
   {
      // Visual Confirmation
      if ( $userdata['session_logged_in'] )
      {
         exit;
      }

      include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
      exit;
   }
	else if ( $mode == 'sendpassword' )
	{
		include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
		exit;
	}
	else if ( $mode == 'activate' )
	{
		include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
		exit;
	}
	else if ( $mode == 'email' )
	{
		include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
		exit;
	}
}

redirect(append_sid("index.$phpEx", true));

?>
Benutzeravatar
Leuchte
Ehemaliges Teammitglied
Beiträge: 9179
Registriert: 26.05.2003 14:57
Wohnort: Duisburg
Kontaktdaten:

Beitrag von Leuchte »

Kopierfehler, oder fehlt am Anfang der Datei das

Code: Alles auswählen

<?php
?
das hatte rein garnichts mit php zu tun...
Die Logik erkläre mir bitte noch einmal per PN :roll:
pandorra
Mitglied
Beiträge: 210
Registriert: 18.04.2005 17:45

Beitrag von pandorra »

in dem code gibt es keine zeile 131 :/

@leuchte mach ich...
namenloserposter
Mitglied
Beiträge: 93
Registriert: 04.08.2004 00:09

Beitrag von namenloserposter »

vielen dank euch ersteinmal für die hilfe und mühe !

@ leuchte; nein das ist da:

Code: Alles auswählen

<?php
/***************************************************************************
 *                                profile.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: profile.php,v 1.193.2.4 2004/07/11 16:46:17 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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);

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

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
	$sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
	$sid = '';
}

//
// Set default email variables
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
	$chars = array( 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J',  'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T',  'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

	$max_chars = count($chars) - 1;
	srand( (double) microtime()*1000000);

	$rand_str = '';
	for($i = 0; $i < 8; $i++)
	{
		$rand_str = ( $i == 0 ) ? $chars[rand(0, $max_chars)] : $rand_str . $chars[rand(0, $max_chars)];
	}

	return ( $hash ) ? md5($rand_str) : $rand_str;
}
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//
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 == 'viewprofile' )
	{
		include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
		exit;
	}
	else if ( $mode == 'editprofile' || $mode == 'register' )
	{
		if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
		{
			redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
		}

	 else if ( $mode == 'confirm' )
   {
      // Visual Confirmation
      if ( $userdata['session_logged_in'] )
      {
         exit;
      }

      include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
      exit;
   }
	else if ( $mode == 'sendpassword' )
	{
		include($phpbb_root_path . 'includes/usercp_sendpasswd.'.$phpEx);
		exit;
	}
	else if ( $mode == 'activate' )
	{
		include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
		exit;
	}
	else if ( $mode == 'email' )
	{
		include($phpbb_root_path . 'includes/usercp_email.'.$phpEx);
		exit;
	}
}

redirect(append_sid("index.$phpEx", true));

?>
sagt mal habt irgendwo eine website mit evtl einem kleinen werbebanner mit pay per klick ? könnt mir ja mal die url dazu schicken. irgendwie muss ich mich ja mal erkenntlich zeigen :)
namenloserposter
Mitglied
Beiträge: 93
Registriert: 04.08.2004 00:09

Beitrag von namenloserposter »

und das es keine zeile 131 gibt habe ich auch schon im proton gesehen :)
aber was heisst dann lane 131 und so einfach finde ich das nun schon doch nicht mehr :)
Benutzeravatar
MrMind
Mitglied
Beiträge: 464
Registriert: 29.11.2003 17:14
Wohnort: Darmstadt/Odw
Kontaktdaten:

Beitrag von MrMind »

Warum er 131 anzeigt ist klar. Der PHP-Parser hat den Fehler erst am Schluss festgestellt und nimmt automatisch die nächste Zeile, somit 131, da die Datei 130 Zeilen hatte.

Der Fehler war ein Klammerfehler. Es hat eine } gefehlt.

Code: Alles auswählen

 else if ( $mode == 'editprofile' || $mode == 'register' )
   {
      if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
      {
         redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
      }

    else if ( $mode == 'confirm' ) 
da fehlt vor dem else if ( $mode == 'confirm' ) eine }, so ist es richtig:

Code: Alles auswählen

 else if ( $mode == 'editprofile' || $mode == 'register' )
   {
      if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
      {
         redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
      }
   }
    else if ( $mode == 'confirm' ) 
Habs bei mir lokal getestet. Klappt dann auch.

Bei mir hat er auch nur einen parser Error angezeigt mehr net, nichts mit $ oder so ;)

Mfg
MrMind
Selbst ist der Coder
Coder unter Linux
Antworten

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