2012-09-11, 04:22 AM
Hi, I go to my ftp directory, it says you must log in to Administrator account and it I use my log in stats and nothing happens, the page refreshes and the box turns blank. HELP PLEASE!
This is the code bleck that is above it
$config['dbtype'], "database" => $config['database'], "table_prefix" => $config['table_prefix'], "hostname" => $config['hostname'], "username" => $config['username'], "password" => $config['password'], "encoding" => $config['db_encoding'], ); } $mybb->config = &$config; // Include the files necessary for installation require_once MYBB_ROOT."inc/class_timers.php"; require_once MYBB_ROOT."inc/functions.php"; require_once MYBB_ROOT."inc/class_xml.php"; require_once MYBB_ROOT.'inc/class_language.php'; $lang = new MyLanguage(); $lang->set_path(MYBB_ROOT.'install/resources/'); $lang->load('language'); // If we're upgrading from an SQLite installation, make sure we still work. if($config['database']['type'] == 'sqlite3' || $config['database']['type'] == 'sqlite2') { $config['database']['type'] = 'sqlite'; } require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type']) { case "sqlite": $db = new DB_SQLite; break; case "pgsql": $db = new DB_PgSQL; break; case "mysqli": $db = new DB_MySQLi; break; default: $db = new DB_MySQL; } // Connect to Database define('TABLE_PREFIX', $config['database']['table_prefix']); $db->connect($config['database']); $db->set_table_prefix(TABLE_PREFIX); $db->type = $config['database']['type']; // Load Settings if(file_exists(MYBB_ROOT."inc/settings.php")) { require_once MYBB_ROOT."inc/settings.php"; } if(!file_exists(MYBB_ROOT."inc/settings.php") || !$settings) { if(function_exists('rebuild_settings')) { rebuild_settings(); } else { $options = array( "order_by" => "title", "order_dir" => "ASC" ); $query = $db->simple_select("settings", "value, name", "", $options); while($setting = $db->fetch_array($query)) { $setting['value'] = str_replace("\"", "\\\"", $setting['value']); $settings[$setting['name']] = $setting['value']; } } } $settings['wolcutoff'] = $settings['wolcutoffmins']*60; $settings['bbname_orig'] = $settings['bbname']; $settings['bbname'] = strip_tags($settings['bbname']); // Fix for people who for some specify a trailing slash on the board URL if(substr($settings['bburl'], -1) == "/") { $settings['bburl'] = my_substr($settings['bburl'], 0, -1); } $mybb->settings = &$settings; $mybb->parse_cookies(); require_once MYBB_ROOT."inc/class_datacache.php"; $cache = new datacache; // Load cache $cache->cache(); $mybb->cache = &$cache; require_once MYBB_ROOT."inc/class_session.php"; $session = new session; $session->init(); $mybb->session = &$session; // Include the necessary contants for installation $grouppermignore = array("gid", "type", "title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $groupzerogreater = array("pmquota", "maxreputationsday", "attachquota"); $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $fpermfields = array("canview", "candlattachments", "canpostthreads", "canpostreplys", "canpostattachments", "canratethreads", "caneditposts", "candeleteposts", "candeletethreads", "caneditattachments", "canpostpolls", "canvotepolls", "cansearch"); // Include the installation resources require_once INSTALL_ROOT."resources/output.php"; $output = new installerOutput; $output->script = "upgrade.php"; $output->title = "MyBB Upgrade Wizard"; if(file_exists("lock")) { $output->print_error($lang->locked); } else { if($mybb->input['action'] == "logout" && $mybb->user['uid']) { // Check session ID if we have one if($mybb->input['logoutkey'] != $mybb->user['logoutkey']) { $output->print_error("Your user ID could not be verified to log you out. This may have been because a malicious Javascript was attempting to log you out automatically. If you intended to log out, please click the Log Out button at the top menu."); } my_unsetcookie("mybbuser"); my_unsetcookie("sid"); if($mybb->user['uid']) { $time = TIME_NOW; $lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'"); $db->delete_query("sessions", "sid='".$session->sid."'"); } header("Location: upgrade.php"); } else if($mybb->input['action'] == "do_login" && $mybb->request_method == "post") { require_once MYBB_ROOT."inc/functions_user.php"; if(!username_exists($mybb->input['username'])) { $output->print_error("The username you have entered appears to be invalid."); } $query = $db->simple_select("users", "uid,username,password,salt,loginkey", "username='".$db->escape_string($mybb->input['username'])."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['uid']) { $output->print_error("The username you have entered appears to be invalid."); } else { $user = validate_password_from_uid($user['uid'], $mybb->input['password'], $user); if(!$user['uid']) { $output->print_error("The password you entered is incorrect. If you have forgotten your password, click here. Otherwise, go back and try again."); } } $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array( "uid" => $user['uid'] ); $db->update_query("sessions", $newsession, "sid='".$session->sid."'"); // Temporarily set the cookie remember option for the login cookies $mybb->user['remember'] = $user['remember']; my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true); my_setcookie("sid", $session->sid, -1, true); header("Location: ./upgrade.php"); } $output->steps = array($lang->upgrade); if($mybb->user['uid'] == 0) { $output->print_header("Please Login", "errormsg", 0, 1); $output->print_contents('
Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.
Login
Username:
Password:
Please note that passwords are case sensitive.
This is the code bleck that is above it
$config['dbtype'], "database" => $config['database'], "table_prefix" => $config['table_prefix'], "hostname" => $config['hostname'], "username" => $config['username'], "password" => $config['password'], "encoding" => $config['db_encoding'], ); } $mybb->config = &$config; // Include the files necessary for installation require_once MYBB_ROOT."inc/class_timers.php"; require_once MYBB_ROOT."inc/functions.php"; require_once MYBB_ROOT."inc/class_xml.php"; require_once MYBB_ROOT.'inc/class_language.php'; $lang = new MyLanguage(); $lang->set_path(MYBB_ROOT.'install/resources/'); $lang->load('language'); // If we're upgrading from an SQLite installation, make sure we still work. if($config['database']['type'] == 'sqlite3' || $config['database']['type'] == 'sqlite2') { $config['database']['type'] = 'sqlite'; } require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type']) { case "sqlite": $db = new DB_SQLite; break; case "pgsql": $db = new DB_PgSQL; break; case "mysqli": $db = new DB_MySQLi; break; default: $db = new DB_MySQL; } // Connect to Database define('TABLE_PREFIX', $config['database']['table_prefix']); $db->connect($config['database']); $db->set_table_prefix(TABLE_PREFIX); $db->type = $config['database']['type']; // Load Settings if(file_exists(MYBB_ROOT."inc/settings.php")) { require_once MYBB_ROOT."inc/settings.php"; } if(!file_exists(MYBB_ROOT."inc/settings.php") || !$settings) { if(function_exists('rebuild_settings')) { rebuild_settings(); } else { $options = array( "order_by" => "title", "order_dir" => "ASC" ); $query = $db->simple_select("settings", "value, name", "", $options); while($setting = $db->fetch_array($query)) { $setting['value'] = str_replace("\"", "\\\"", $setting['value']); $settings[$setting['name']] = $setting['value']; } } } $settings['wolcutoff'] = $settings['wolcutoffmins']*60; $settings['bbname_orig'] = $settings['bbname']; $settings['bbname'] = strip_tags($settings['bbname']); // Fix for people who for some specify a trailing slash on the board URL if(substr($settings['bburl'], -1) == "/") { $settings['bburl'] = my_substr($settings['bburl'], 0, -1); } $mybb->settings = &$settings; $mybb->parse_cookies(); require_once MYBB_ROOT."inc/class_datacache.php"; $cache = new datacache; // Load cache $cache->cache(); $mybb->cache = &$cache; require_once MYBB_ROOT."inc/class_session.php"; $session = new session; $session->init(); $mybb->session = &$session; // Include the necessary contants for installation $grouppermignore = array("gid", "type", "title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $groupzerogreater = array("pmquota", "maxreputationsday", "attachquota"); $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $fpermfields = array("canview", "candlattachments", "canpostthreads", "canpostreplys", "canpostattachments", "canratethreads", "caneditposts", "candeleteposts", "candeletethreads", "caneditattachments", "canpostpolls", "canvotepolls", "cansearch"); // Include the installation resources require_once INSTALL_ROOT."resources/output.php"; $output = new installerOutput; $output->script = "upgrade.php"; $output->title = "MyBB Upgrade Wizard"; if(file_exists("lock")) { $output->print_error($lang->locked); } else { if($mybb->input['action'] == "logout" && $mybb->user['uid']) { // Check session ID if we have one if($mybb->input['logoutkey'] != $mybb->user['logoutkey']) { $output->print_error("Your user ID could not be verified to log you out. This may have been because a malicious Javascript was attempting to log you out automatically. If you intended to log out, please click the Log Out button at the top menu."); } my_unsetcookie("mybbuser"); my_unsetcookie("sid"); if($mybb->user['uid']) { $time = TIME_NOW; $lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'"); $db->delete_query("sessions", "sid='".$session->sid."'"); } header("Location: upgrade.php"); } else if($mybb->input['action'] == "do_login" && $mybb->request_method == "post") { require_once MYBB_ROOT."inc/functions_user.php"; if(!username_exists($mybb->input['username'])) { $output->print_error("The username you have entered appears to be invalid."); } $query = $db->simple_select("users", "uid,username,password,salt,loginkey", "username='".$db->escape_string($mybb->input['username'])."'", array('limit' => 1)); $user = $db->fetch_array($query); if(!$user['uid']) { $output->print_error("The username you have entered appears to be invalid."); } else { $user = validate_password_from_uid($user['uid'], $mybb->input['password'], $user); if(!$user['uid']) { $output->print_error("The password you entered is incorrect. If you have forgotten your password, click here. Otherwise, go back and try again."); } } $db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'"); $newsession = array( "uid" => $user['uid'] ); $db->update_query("sessions", $newsession, "sid='".$session->sid."'"); // Temporarily set the cookie remember option for the login cookies $mybb->user['remember'] = $user['remember']; my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true); my_setcookie("sid", $session->sid, -1, true); header("Location: ./upgrade.php"); } $output->steps = array($lang->upgrade); if($mybb->user['uid'] == 0) { $output->print_header("Please Login", "errormsg", 0, 1); $output->print_contents('
Please enter your username and password to begin the upgrade process. You must be a valid forum administrator to perform the upgrade.
Login
Username:
Password:
Please note that passwords are case sensitive.