Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Trying to upgrade.... (http://www.mysidiaadoptables.com/forum/showthread.php?t=2464)

SilverDragonTears 10-22-2011 10:28 PM

Trying to upgrade....
 
without losing all my modifications and when I try to encrypt passwords it says I have to upgrade to 1.2.3 Why can't I just do it manually? This is really frustrating.

Hall of Famer 10-24-2011 07:47 AM

Lol this. It was set this way to prevent admins from running password encryption multiple times, as they may end up running userencrypt.php twice to mess things up. I will show u a solution to ur problem later.

SilverDragonTears 10-24-2011 11:18 AM

Thank you ;)

Hall of Famer 10-24-2011 04:28 PM

Well your userencrypt.php file should looks like this below:

PHP Code:

<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//

$article_title "User Password Encryption Wizard"
$article_content "You are trying to encrypt every user's password, this may take a few secs or mins depending on the size of your memberbase. </br></br>";
$vers grabanysetting("version");

if(
$vers == "1.2.3"){

$query "SELECT * FROM {$prefix}users";
$result runquery($query);

while(
$user mysql_fetch_array($result)){
$newpass updatepass($user['username'], $user['password']);

$query "UPDATE {$prefix}users SET password='{$newpass}' WHERE username='{$user['username']}'";
runquery($query);

$article_content .= "Updating user {$user['username']}, action complete.</br>";

}



$article_content .= "</br>You have successfully encrypted your password! You can now log into your account and build an awesome adoptables site of yours!</br>
<br><b>We strongly recommend you to remove usercrypt.php now, together with the entire /install folder before managing your site.</b>"
;

$query "DELETE FROM {$prefix}settings WHERE name='version'";
runquery($query);

}
else{
  
$article_content .= "You are still using an old version of Mysidia Adoptables, please upgrade before running user password encryption wizard.";
}

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title$article_content$date);

?>

Replace with:
PHP Code:

<?php

include("inc/functions.php");

//***************//
//  START SCRIPT //
//***************//

$article_title "User Password Encryption Wizard"
$article_content "You are trying to encrypt every user's password, this may take a few secs or mins depending on the size of your memberbase. </br></br>";

$query "SELECT * FROM {$prefix}users";
$result runquery($query);

while(
$user mysql_fetch_array($result)){
$newpass updatepass($user['username'], $user['password']);

$query "UPDATE {$prefix}users SET password='{$newpass}' WHERE username='{$user['username']}'";
runquery($query);

$article_content .= "Updating user {$user['username']}, action complete.</br>";

}



$article_content .= "</br>You have successfully encrypted your password! You can now log into your account and build an awesome adoptables site of yours!</br>
<br><b>We strongly recommend you to remove usercrypt.php now, together with the entire /install folder before managing your site.</b>"
;

$query "DELETE FROM {$prefix}settings WHERE name='version'";
runquery($query);

//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title$article_content$date);

?>

Make sure you back up your table prefix.users before running the new script, since you will mess up the password encryption if you by any chance executes the script twice or more. Sometimes you may not even realize that you've done this, it happens to me too with slower internet.

SilverDragonTears 10-24-2011 06:54 PM

I got this
Fatal error: Call to undefined function updatepass() in /home/robynswo/public_html/userencrypt.php on line 16

Hall of Famer 10-25-2011 01:54 AM

Well then you need to update your functions.php file.


All times are GMT -5. The time now is 02:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.