Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Password update when upgrading from v6 to v7

Asked Modified Viewed 11,631 times
M
MikeCZE
M
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Junior Member

As you probably know, v6 uses single md5 hash for passwords. V7 uses double md5... That means all passwords will not work.

How to update the passwords:

SAVE fusion_users TABLE BEFORE UPDATING!

1. create php file with a random title, for example db_md5.php and put there this:
<?php

// Locate config.php and set the basedir path
$folder_level = ""; $i = 0;
while (!file_exists($folder_level."config.php")) {
   $folder_level .= "../"; $i++;
   if ($i == 5) { die("Config file not found"); }
}
require_once $folder_level."config.php";
define("BASEDIR", $folder_level);

function dbconnect($db_host, $db_user, $db_pass, $db_name) {
   $db_connect = @mysql_connect($db_host, $db_user, $db_pass);
   $db_select = @mysql_select_db($db_name);
   if (!$db_connect) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to establish connection to MySQL</b><br />".mysql_errno()." : ".mysql_error()."</div>");
   } elseif (!$db_select) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to select MySQL database</b><br />".mysql_errno()." : ".mysql_error()."</div>");
   }
}

// Establish mySQL database connection
$link = dbconnect($db_host, $db_user, $db_pass, $db_name);

//////////////////////////////////////

$db_request = 'SELECT * FROM fusion_users ORDER BY user_id';
$exec = mysql_query($db_request);
while ($line = mysql_fetch_array($exec)) {
   extract($line);
   $result = md5($line['user_password']);
   mysql_query("UPDATE fusion_users SET user_password='".$result."' WHERE user_id = ".$line['user_id']);
   echo "id ".$line['user_id']." done sucessfully<br />";
}

?>


2. save it, get it in your root folder (where config.php is also located)

3. run it in your browser - http://your_adress.com/db_md5.php

All done.
0 replies

20 posts

C
clone9cz
C
www.vwings.net
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

I am not sure (think not). There is new column
[syntaxhighlighter brush=sql,first-line=1,highlight=0,collapse=false,html-script=false] user_salt varchar(40) NOT NULL DEFAULT '',[/syntaxhighlighter]


My solution
[olist=1]Change password of user XYZ by admin.
UPDATEfusion_users SET user_salt='<XYZ_salt>',user_password='<XYZ_password>' WHERE user_id !=1;[/olist]

Password reset will work
0 replies

Category Forum

Upgrading issues - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 20 posts
  • Votes 0 votes
  • Topic users 8 members

8 participants

M
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
D
D
"Might and Greed will never outweigh Honor and Loyalty"

Come join us for IRC Support: Here
  • Member, joined since
  • Contributed 152 posts on the community forums.
  • Started 31 threads in the forums
K
K
  • Member, joined since
  • Contributed 63 posts on the community forums.
  • Started 8 threads in the forums
S
S
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
A
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
K
K
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 5 threads in the forums
M
M
  • Junior Member, joined since
  • Contributed 14 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
C
C
www.vwings.net
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet