Nach Update auf 2.0.22 phpBB : Critical Erorr Could not loca

Eine Neuinstallation von phpBB 2.0 wird auf phpBB.de nicht mehr unterstützt.
Siehe auch Entwicklungs-Ende von phpBB 2.0 - Auswirkungen auf phpBB.de
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.

Eine Neuinstallation von phpBB 2.0 wird auf phpBB.de nicht mehr unterstützt.
Siehe auch Entwicklungs-Ende von phpBB 2.0 - Auswirkungen auf phpBB.de
Gesperrt
Benutzeravatar
tuxator
Mitglied
Beiträge: 3
Registriert: 28.09.2006 12:37

Nach Update auf 2.0.22 phpBB : Critical Erorr Could not loca

Beitrag von tuxator »

Hallo Forum,

ich habe ein Update auf 2.0.22 gemacht
(lt.: phpBB2/docs/INSTALL.html#upgradeRC)

Nach Aufruf des Forum und/oder Adminbereich bekomme ich die Meldung:

phpBB : Critical Error

Could not locate valid language pack

Ok, ich habe hier "Fix für Usersprache im phpBB 2.0.21" gefunden und bei mir angewendet. Funktioniert aber nicht. Hier ein Auszug aus meiner function.php

Code: Alles auswählen

//
// Initialise user settings on page load
function init_userprefs($userdata)
{
	global $board_config, $theme, $images;
	global $template, $lang, $phpEx, $phpbb_root_path, $db;
	global $nav_links;

	if ( $userdata['user_id'] != ANONYMOUS )
	{
		if ( !empty($userdata['user_lang']))
		{
			$default_lang = phpbb_ltrim(basename(phpbb_rtrim($userdata['user_lang'])), "'");
		}

		if ( !empty($userdata['user_dateformat']) )
		{
			$board_config['default_dateformat'] = $userdata['user_dateformat'];
		}

		if ( isset($userdata['user_timezone']) )
		{
			$board_config['board_timezone'] = $userdata['user_timezone'];
		}
	}
	else
	{
		$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
	}

	if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
	{
		if ( $userdata['user_id'] != ANONYMOUS )
		{
			// For logged in users, try the board default language next
			$default_lang = phpbb_ltrim(basename(phpbb_rtrim($board_config['default_lang'])), "'");
		}
		else
		{
			// For guests it means the default language is not present, try english
			// This is a long shot since it means serious errors in the setup to reach here,
			// but english is part of a new install so it's worth us trying
			$default_lang = 'english';
		}

		if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) )
		{
			message_die(CRITICAL_ERROR, 'Could not locate valid language pack');
		}
	}

	// If we've had to change the value in any way then let's write it back to the database
	// before we go any further since it means there is something wrong with it
	if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_lang'] !== $default_lang )
	{
		$sql = 'UPDATE ' . USERS_TABLE . "
			SET user_lang = '" . $default_lang . "'
			WHERE user_lang = '" . $userdata['user_lang'] . "'";

		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(CRITICAL_ERROR, 'Could not update user language info');
		}

		$userdata['user_lang'] = $default_lang;
	}
	elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang )
	{
		$sql = 'UPDATE ' . CONFIG_TABLE . "
			SET config_value = '" . $default_lang . "'
			WHERE config_name = 'default_lang'";

		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(CRITICAL_ERROR, 'Could not update user language info');
		}
	}

	      $userdata['user_lang'] = $default_lang;
   }
    elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang )

	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);

	if ( defined('IN_ADMIN') )
	{
		if( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) )

   }
   $board_config['default_lang'] = $default_lang
		}

		include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);
	}

	//
	// Set up style
	//
Liegt das an der Version? (Fix für 2.0.21, Mein Probl. 2.0.22)
Benutzeravatar
killerbees19
Mitglied
Beiträge: 1185
Registriert: 09.05.2006 17:33
Wohnort: Wien (Österreich)
Kontaktdaten:

Beitrag von killerbees19 »

Could not locate valid language pack
Das bedeuted, dass die Sprachdateien im Ordner language komplett fehlen, oder jedenfalls die lang_main.php ;-)
Hast du auch alle Sprachdateien hochgeladen für die eingestelle Sprache?
Vielleicht hast du die Standardsprache gelöscht, dann versucht phpbb nämlich Englisch zu nehmen, wenn es das nciht gibt kommt die Fehlermeldung ;-)


MfG Christian
» Real programmers don't comment. If it was hard to write, it should be hard to understand!
Benutzeravatar
tuxator
Mitglied
Beiträge: 3
Registriert: 28.09.2006 12:37

Beitrag von tuxator »

ok, THX...
Die Verz. warn wirkl. leer. GNOME/gftp....

asche aufs haupt...

:oops:
Gesperrt

Zurück zu „phpBB 2.0: Installation und Update“