Seite 1 von 1

Fehler nach Update auf 2.0.21

Verfasst: 01.10.2006 16:29
von UGHQ.net
Hallo, habe ein Riesenproblem...

Wollte auf die neueste Version updaten und nun komm ich nicht mehr in mein Forum. Ich erhalte folgendes, wenn ich die index Seite aufrufe:

Code: Alles auswählen

e_sql = 'session_user_id = ' . (int) $user_id; $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <> '" . $userdata['session_id'] . "'" : ''; $sql = 'DELETE FROM ' . SESSIONS_TABLE . " WHERE $where_sql"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql); } if ( !empty($key_sql) ) { $auto_login_key = dss_rand() . dss_rand(); $current_time = time(); $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . " SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time WHERE key_id = '" . md5($userdata['session_key']) . "'"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql); } // And now rebuild the cookie $sessiondata['userid'] = $user_id; $sessiondata['autologinid'] = $auto_login_key; $cookiename = $board_config['cookie_name']; $cookiepath = $board_config['cookie_path']; $cookiedomain = $board_config['cookie_domain']; $cookiesecure = $board_config['cookie_secure']; setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); $userdata['session_key'] = $auto_login_key; unset($sessiondata); unset($auto_login_key); } } // // Append $SID to a url. Borrowed from phplib and modified. This is an // extra routine utilised by the session code above and acts as a wrapper // around every single URL and form action. If you replace the session // code you must include this routine, even if it's empty. // function append_sid($url, $non_html_amp = false) { global $SID; if ( !empty($SID) && !preg_match('#sid=#', $url) ) { $url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } return $url; } ?>
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 258

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 259
l/ and contrib/ directories are deleted'; // // That's all, Folks! // ------------------------------------------------- ?>
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/page_header.php on line 479

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/page_header.php on line 486
und wenn ich dann versuche mich einzuloggen, erscheint dies auf einer weißen Seite:

Code: Alles auswählen

e_sql = 'session_user_id = ' . (int) $user_id; $where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <> '" . $userdata['session_id'] . "'" : ''; $sql = 'DELETE FROM ' . SESSIONS_TABLE . " WHERE $where_sql"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql); } if ( !empty($key_sql) ) { $auto_login_key = dss_rand() . dss_rand(); $current_time = time(); $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . " SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time WHERE key_id = '" . md5($userdata['session_key']) . "'"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql); } // And now rebuild the cookie $sessiondata['userid'] = $user_id; $sessiondata['autologinid'] = $auto_login_key; $cookiename = $board_config['cookie_name']; $cookiepath = $board_config['cookie_path']; $cookiedomain = $board_config['cookie_domain']; $cookiesecure = $board_config['cookie_secure']; setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); $userdata['session_key'] = $auto_login_key; unset($sessiondata); unset($auto_login_key); } } // // Append $SID to a url. Borrowed from phplib and modified. This is an // extra routine utilised by the session code above and acts as a wrapper // around every single URL and form action. If you replace the session // code you must include this routine, even if it's empty. // function append_sid($url, $non_html_amp = false) { global $SID; if ( !empty($SID) && !preg_match('#sid=#', $url) ) { $url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } return $url; } ?>
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 370

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 371
l/ and contrib/ directories are deleted'; // // That's all, Folks! // ------------------------------------------------- ?>
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 258

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/sessions.php on line 259

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/web154/html/forum/phpBB2/includes/sessions.php:528) in /srv/www/web154/html/forum/phpBB2/includes/functions.php on line 942
Was habe ich falsch gemacht? Habe auch schon probiert, komplett 2.0.21 auf den Server zu kopieren (ausser config.php), aber die Fehler bleiben die gleichen. Bin um jede Hilfe dankbar.

Verfasst: 01.10.2006 16:46
von UGHQ.net
Oder kann ich irgendwie das Forum auf dem Server komplett löschen und neu installieren, OHNE den Inhalt zu verlieren? Also so, dass ich praktisch die jetzige Datenbank in ein neues Forum bringe?

Verfasst: 01.10.2006 17:58
von Beagleman
Also der Code, der da angzeigt wird, stammt offenbar aus der Datei includes/sessions.php .

Such mal darin nach

Code: Alles auswählen

$where_sql .= ($user_id
und vergleiche die Zeile über diesen Code-Schnippsel mit der Original-Datei. Darüber müsste eigentlich stehen

Code: Alles auswählen

$where_sql = 'session_user_id = ' . (int) $user_id;

Verfasst: 01.10.2006 19:22
von UGHQ.net
also, das ist Zeile 510 - 520 von der Datei auf dem Server:

Code: Alles auswählen

	{
		$url .= ( ( strpos($url, '?') !== false ) ?  ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
	}

	return $url;
}

?>       $where_sql = 'session_user_id = ' . (int) $user_id;
	$where_sql .= ($user_id == $userdata['user_id']) ? " AND session_id <> '" . $userdata['session_id'] . "'" : '';
	$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
		WHERE $where_sql";
und das die gleichen Zeilen aus der original entpackten Forumsversion 2.0.21:

Code: Alles auswählen

	$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
		WHERE user_id = ' . (int) $user_id . "
			$key_sql";

	if ( !$db->sql_query($sql) )
	{
		message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql);
	}

	$where_sql = 'session_user_id = ' . (int) $user_id;
Ich als Laie sehe nur, dass die nicht gleich sind. Aber was da jetzt zu ändern ist, weiss ich nicht :(

Der Fehler bleibt übrigens auch bestehen, wenn ich die sessions.php neu auf den Server lade.

Verfasst: 01.10.2006 19:23
von Miriam
Und davor ist der Fehler. :)

Verfasst: 01.10.2006 19:25
von UGHQ.net
Waaaaahhhhh.... was für ein Fehler denn? Und vor allem, warum bleibt der Fehler, wenn ich sessions.php neu auf den Server lade? Und warumist der Fehler überhaupt da? Hab doch an den Dateien nix geändert. :(

Verfasst: 01.10.2006 19:36
von UGHQ.net
Puh, geschafft. Das Problem lag an FileZilla. Der hat die Datei nicht vollständig übertragen. Die Sau. :D Trotzdem danke für die Hilfe. ;)