Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Did you know that
Elxis 5.x
uses HTML5, CSS3 and pure javascript without external libraries such as jQuery?
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
password recovery in localhost
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: password recovery in localhost (Read 15947 times)
ahmet
Sr. Member
Posts: 283
360 HDR Virtual Tours | Windsurfing Sailing
password recovery in localhost
«
on:
November 15, 2011, 11:29:59 »
hello all,
i have forgotten the localhost admin password.how do i recover it? thanks...
Logged
www.puretourism.co.uk
www.globalpanorama.net
www.bodrumwindsurf.com
nikos
Elxis Community
Hero Member
Posts: 1094
Re: password recovery in localhost
«
Reply #1 on:
November 15, 2011, 12:28:12 »
With phpMyAdmin open table elx_users of your site's database and click on view to see all users. There, edit the id of super administrator and into password field set a new one and on the left choose function MD5. Save it and you are ready.
«
Last Edit: November 15, 2011, 12:35:09 by nikos
»
Logged
Elxis Community |
Open Source Web Lab
ahmet
Sr. Member
Posts: 283
360 HDR Virtual Tours | Windsurfing Sailing
Re: password recovery in localhost
«
Reply #2 on:
November 15, 2011, 12:52:25 »
tnx..
Logged
www.puretourism.co.uk
www.globalpanorama.net
www.bodrumwindsurf.com
seadhna
Hero Member
Posts: 507
Re: password recovery in localhost
«
Reply #3 on:
April 19, 2015, 16:03:54 »
Hi, this method doesn't work anymore - what is the new process?
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: password recovery in localhost
«
Reply #4 on:
April 20, 2015, 13:40:01 »
The replies of this thread are addressed to Elxis CMS 200x.x. We don't use MD5 encryption to Elxis CMS 4.x series
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
seadhna
Hero Member
Posts: 507
Re: password recovery in localhost
«
Reply #5 on:
April 21, 2015, 14:30:18 »
Ok, thanks!
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: password recovery in localhost
«
Reply #6 on:
April 21, 2015, 20:46:38 »
You are welcome!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
kyomar
Full Member
Posts: 158
Re: password recovery in localhost
«
Reply #7 on:
September 21, 2016, 10:40:55 »
Hi, sorry for reopening this post but I have same problem but with elxis 4.x and the new method hasn't been explained here. I don't know whether this is connected but I couldn't login anymore after the latest update r1888.
Thank you!
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: password recovery in localhost
«
Reply #8 on:
September 21, 2016, 14:28:23 »
If you updated from
4.2
re-download the
4.2 to 4.3 update patch
and read carefully the how-to instructions. There is a big warning regarding passwords encryption method change.
https://www.elxis.net/edc/core/100.html
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
kyomar
Full Member
Posts: 158
Re: password recovery in localhost
«
Reply #9 on:
September 22, 2016, 04:22:33 »
Thanks datahell for your quick reply. I have updated from r1886, so this shouldn't be a problem. How can I recover the admin password in the database (phpadmin)?
Thank you!
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: password recovery in localhost
«
Reply #10 on:
September 22, 2016, 19:01:30 »
The passwords (and all data) don't get affected by Elxis updates. I dont know how you lost it but this is what you should do.
Passwords cannot be changed via phpmyadmin
because they are encrypted by Elxis. If you type a password, even md5 encrypted, via phpmyadmin simply you wont be able to login in Elxis!
Passwords can be changed only inside Elxis
.
Open the index.php file of the
template
you use. For example
templates/chloe/index.php
Copy paste the code below to the top of the template (below line
defined('_ELXIS_') or die....
)
$username = '
myusername
';
$password = '
mypassword
';
if (isset($_GET['cp'])) {
$elxis = eFactory::getElxis();
$db = eFactory::getDB();
$penc = $elxis->obj('crypt')->getEncryptedPassword($password);
$sql = "UPDATE ".$db->quoteId('#__users')." SET ".$db->quoteId('pword')." = :xp WHERE ".$db->quoteId('uname')." = :xu";
$stmt = $db->prepare($sql);
$stmt->bindParam(':xp', $penc, PDO::PARAM_STR);
$stmt->bindParam(':xu', $username, PDO::PARAM_STR);
$stmt->execute();
echo 'Password for user '.$username.' changed!';
exit;
}
At the top of the code I wrote set the username of the user you want to change its password. For example
$username = 'someuser';
Set the new password for the user:
$password = 'somethingsecret';
Save index.php and visit your site by adding ?cp=1 in the URL. For example:
http://www.example.com/?cp=1
The password will be changed.
After that remove the extra lines you previously added in template's file index.php and you are ready to login with the new password.
«
Last Edit: July 02, 2018, 19:57:16 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
kyomar
Full Member
Posts: 158
Re: password recovery in localhost
«
Reply #11 on:
September 23, 2016, 03:40:56 »
Thank you datahell, great support as usual.
The code worked well but I still cannot login (incorrect password). I have restored the backups (db & files) from before the update (r1886) and I can login. Then I installed the r1888 update again with the same result that I cannot login. So I assume it has something to do with the update. This is on a local install (localhost, lampp). I don't update the live version until I have solved this issue.
Thank you for your time/help - much appreciated.
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: password recovery in localhost
«
Reply #12 on:
September 23, 2016, 11:53:38 »
Hello!
Apply the update to the latest version however keep the same old copy of crypt.helper.php file
as it is located to: /includes/libraries/elxis/helpers/ directory
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
datahell
Elxis Team
Hero Member
Posts: 10356
Re: password recovery in localhost
«
Reply #13 on:
September 23, 2016, 14:57:28 »
If you change the password as I told you, you will be able to login regardless Elxis version and update status.
I guarantee that
. If you cant login then maybe the browser sends a saved password. Delete saved passwords and re-try or try with a different browser. Update to Elxis latest version (use the latest crypt helper file), change the password as I told you (dont use strange symbols) and login.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
kyomar
Full Member
Posts: 158
Re: password recovery in localhost
«
Reply #14 on:
September 24, 2016, 12:25:13 »
Thank you datahell and webgift. I have to disappoint you datahell, I still couldn't login although setting new password seems to have worked (Password for user **** changed!). After this I tried webgift's suggestion (old crypt.helper.php) and I can login again - great! But now when I check file-system it says crypt.helper.php needs update. So I guess there is something wrong with crypt.helper.php.
Update: I updated hosted version (live) us well and the same problem, cannot login anymore. Only restoring old crypt.helper.php file solved the problem.
«
Last Edit: September 27, 2016, 04:16:49 by kyomar
»
Logged
Print
Pages: [
1
]
2
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
password recovery in localhost