phpBB 3.1 unterstützt nicht PHP 7.0 oder höher. Es werden nur PHP-Versionen größer 5.3.3 und kleiner 7.0 unterstützt.
Nicht unterstützte (zu kleine) PHP Version
Wenn deine PHP Version älter als PHP 5.3.3 ist, dann kannst du phpBB 3.1.0 nicht verwenden. Dies führt auch beim Versuchten Update zu einem Fehler, der sich z.B. wie folgt äußern kann:
Code: Alles auswählen
Unexpected character in input: '\' (ASCII=92) state=1
Führe ein Update auf eine neuere PHP Version aus, mindestens 5.3.3 sollte es sein. Es kann sein, dass du hierzu deinen Hoster ansprechen musst, in manchen Fällen reicht auch ein einfaches Umschalten im Administrationsbereich des Hosters für den Webspace.
Konvertieren des Boards während ein fremder Style aktiv ist
Beim Update kommt es derzeit zu Problemen für Benutzer, wenn bei der Konvertierung ein anderer Style als Prosilver aktiv war. phpBB 3.0 Styles sind nicht zu phpBB 3.1 kompatibel und existieren je nach Updatemethode nach dem Update möglicherweise nicht einmal.
Mögliche Fehler die bei diesem Problem auftreten sind:
Code: Alles auswählen
SQL ERROR [ mysqli ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE user_id = 1' at line 3 [1064]
Code: Alles auswählen
SQL ERROR [ mysql4 ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 [1064]
Das folgende Skript setzt den Standard Style des Boards auf Prosilver zurück, ebenso wie sämtliche Benutzer Styles.
Erzeuge eine Textdatei namens
fix.php
mit dem folgenden Inhalt:
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Default style ID
$sql = 'SELECT config_value FROM ' . CONFIG_TABLE . " WHERE config_name = 'default_style'";
$result = $db->sql_query($sql);
$default_style_id = (int) $db->sql_fetchfield('config_value');
$db->sql_freeresult($result);
// Default style name
$sql = 'SELECT style_name FROM ' . STYLES_TABLE . ' WHERE style_id = ' . $default_style_id;
$result = $db->sql_query($sql);
$default_style_name = $db->sql_fetchfield('style_name');
$db->sql_freeresult($result);
// Active styles
$sql = 'SELECT style_id, style_name, style_active FROM ' . STYLES_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$styles_list[] = $row;
}
$db->sql_freeresult($result);
echo 'Default style: ' . $default_style_name . ' (' . $default_style_id . ')<br />';
$exists = file_exists('./styles/' . $default_style_name . '/style.cfg');
if ($exists)
{
echo 'Default style exists, no work to be done.';
exit;
}
if (!file_exists('./styles/prosilver/style.cfg'))
{
echo 'Prosilver does not exist. Please upload a copy of prosilver from the <a href="https://www.phpbb.com/downloads/">3.1.0 Full Package</a>.';
exit;
}
$prosilver = array();
foreach ($styles_list as $style)
{
if ($style['style_name'] == 'prosilver')
{
$prosilver = $style;
break;
}
}
// Install style if it doesn't exist
if (!sizeof($prosilver))
{
$sql_ary = array(
'style_name' => 'prosilver',
'style_copyright' => '© phpBB Group',
'style_active' => 1,
'style_path' => 'prosilver',
'bbcode_bitfield' => 'lNg=',
'style_parent_id' => '0',
'style_parent_tree' => '',
);
$sql = 'INSERT INTO ' . STYLES_TABLE . '
' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
$id = $db->sql_nextid();
$prosilver = array(
'style_name' => 'prosilver',
'style_id' => $id,
'style_active' => 1,
);
echo 'Installed prosilver (' . $id . ').<br />';
}
else
{
// Activate prosilver
$sql = 'UPDATE ' . STYLES_TABLE . " SET style_active = 1 WHERE style_name = 'prosilver'";
$db->sql_query($sql);
}
// Set it as the default style
$sql = 'UPDATE ' . CONFIG_TABLE . ' SET config_value = ' . $prosilver['style_id'] . " WHERE config_name = 'default_style'";
$db->sql_query($sql);
$cache->purge();
echo 'Set prosilver as the default style.<br />';
// Set all users' styles to prosilver
$sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $prosilver['style_id'];
$db->sql_query($sql);
echo 'Updated user styles to prosilver.<br />';
echo 'Done.';
?>
config.php
befindet) hoch und führe sie mit dem Browser aus, indem du sie aufrufst: http://example.org/meinforumpfad/fix.php. Wenn die Datei ohne Fehler ausgeführt wird sollten die Probleme behoben sein. Vergiss nicht, die Datei nach dem Ausführen wieder zu löschen.