Kwam je hier via de link van het upgrade veelgestelde vragen topic?
> voeg dan de SQL die hieronder staat toe aan je PhpMyadmin,
gebruik een SQL generator (
link),
of scroll even naar beneden voor het kant en klare bestand ( voor versie 2.0.22 geldig ! )
Maak wel altijd een backup !!
Opgelost,
de database dacht dat hij versie 2.0.22 was terwijl de login SQL nog niet was uitgevoerd.
Ik denk dat het fout is gegaan toen diederik al versie 2.0.19 had:
Code: Selecteer alles
#Added in 2.0.18
CREATE TABLE " . $table_prefix . "sessions_keys (`key_id` varchar(32) NOT NULL default '0', `user_id` mediumint(8) NOT NULL default '0', `last_ip` varchar(8) NOT NULL default '0', `last_login` int(11) NOT NULL default '0', PRIMARY KEY (`key_id`,`user_id`), KEY `last_login` (`last_login`)) TYPE=MyISAM;
UPDATE " . USERS_TABLE . " SET user_active = 0 WHERE user_id = -1;
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('allow_autologin','1');
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_autologin_time','0');
#Added in 2.0.19
ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_last_login_try int(11) DEFAULT '0' NOT NULL;
ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_login_tries smallint(5) unsigned NOT NULL default '0';
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_login_attempts', '5');
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('login_reset_time', '30');
#Added in 2.0.20
ALTER TABLE " . SEARCH_TABLE . " ADD COLUMN `search_time` int(11) NOT NULL default '0';
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('search_flood_interval', '15');
INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('rand_seed', '0');
TRUNCATE TABLE " . SESSIONS_TABLE . ";
TRUNCATE TABLE " . SESSIONS_KEYS_TABLE . ";
fix:
plaats dit als /install/update_to_latest.php op je forum en bezoek de pagina met je browser:
Code: Selecteer alles
<?php
/***************************************************************************
* db_update.php
* -------------------
*
* copyright : ©2003 Freakin' Booty ;-P & Antony Bailey
* project : http://sourceforge.net/projects/dbgenerator
* Website : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
*
***************************************************************************/
/***************************************************************************
*
* 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_INDEX);
init_userprefs($userdata);
//
// End session management
//
$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';
$sql = array();
$sql[] = "CREATE TABLE " . $table_prefix . "sessions_keys (`key_id` varchar(32) NOT NULL default '0', `user_id` mediumint(8) NOT NULL default '0', `last_ip` varchar(8) NOT NULL default '0', `last_login` int(11) NOT NULL default '0', PRIMARY KEY (`key_id`,`user_id`), KEY `last_login` (`last_login`)) TYPE=MyISAM";
$sql[] = "UPDATE " . USERS_TABLE . " SET user_active = 0 WHERE user_id = -1";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('allow_autologin','1')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_autologin_time','0')";
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_last_login_try int(11) DEFAULT '0' NOT NULL";
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_login_tries smallint(5) unsigned NOT NULL default '0'";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_login_attempts', '5')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('login_reset_time', '30')";
$sql[] = "ALTER TABLE " . SEARCH_TABLE . " ADD COLUMN `search_time` int(11) NOT NULL default '0'";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('search_flood_interval', '15')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('rand_seed', '0')";
$sql[] = "TRUNCATE TABLE " . SESSIONS_TABLE . "";
$sql[] = "TRUNCATE TABLE " . SESSIONS_KEYS_TABLE . "";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
echo '</ul></span></td></tr><tr><td class="catBottom" height="28"> </td></tr>';
echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. ';
echo 'Please be sure to delete this file now.<br />';
echo 'If you have run into any errors, please visit the '.
'<a href="http://www.phpbb.com" target="_phpbbsupport">phpBB support forums</a> or <a href="http://www.phpbbinstallers.com" target="_phpbbinstallers">PhpBBinstallers.com</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>