Forum

Thread tagged as: Question, Problem

password reset

Hello,

Apologies as I did check and found this exact problem was posted by someone else a year ago of not receiving an email when clicking the reset password button and entering the correct email. (Incidentally, there is no problem on resetting the password for my main Perch account with the same email.)

Apparently the only solution is to reset the password in the database. Unfortunately I am not at all familiar working directly with databases so this is will seem a very stupid question: I have opened the sql database file in a text editor but is OK to edit it directly there in the text editor? Many thanks, Kirsten

kirsten edwards

kirsten edwards 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you saying you somehow have two accounts with the same email address?

I mean my main Perch account which holds all the licenses and the site account for one of those licenses. They both have the same email address. I can get a password reset with the former but not the latter

Drew McLellan

Drew McLellan 2638 points
Perch Support

The former is on our site, the latter is yours. Have you configured outgoing email?

In the config file I have the PERCH_EMAIL_FROM set to the email address

But I see now from https://docs.grabaperch.com/docs/installing-perch/configuration/email/ that I needed to configure more settings to enable password reset emails. I have now configured these settings as described for gmail in the email configuration doc (and enabled less secure apps settings) but still not working.

Hello again, apologies for pestering. Still stumped by this and not sure if possible to get any further assistance? Understand if not. Many thanks

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you need to change the password in the database you need to do it directly in the database - have you asked your host how to access your database via PHPMyAdmin or the like?

It's very difficult for us to troubleshoot email issues, as we have no access to your logs. Again your host may be able to offer some insight.

Hi Rachel, Thanks. I can access the database via PHPMyAdmin from my hosting, which I have done and followed Drew's instructions to someone previously needing to reset their password in the same way:

In the perch2_users table, find your user and set the password to:

5f4dcc3b5aa765d61d8327deb882cf99

This will enable you to log in with a password of password

But it comes back as incorrect. Is this not what I should have done? Again, apologies if this is beyond the remit of the forum for you to help with

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you turn on debug and try logging in? Let me know what it outputs.

https://docs.grabaperch.com/docs/installing-perch/configuration/debug/

Hi Drew, Would you be able to point me to the right page/file to add the

<?php PerchUtil::output_debug(); ?>

line to? Many thanks for your patience

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You do not need to add that line to see debug output in admin. Just enable debug in the configuration file.

Sorry, I'm a bit confused. Don't I need the admin password which I am lacking to access admin?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you added debug to your config file and visited the login page?

If so you should see the debug output when you try to log in to admin. On the login page, which is where you are experiencing the problem.

Hi Rachel, Apologies, I for not realising I only needed the config debug and thank you for your patience. This is the output:

Debug Message
Activating via CURL
{"result":"SUCCESS","latest_version":"2.8.15","on_sale_version":"2.8.24"}
DELETE FROM perch2_settings WHERE settingID='latest_version' AND userID=0 LIMIT 1
INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('latest_version','2.8.15',0)
DELETE FROM perch2_settings WHERE settingID='on_sale_version' AND userID=0 LIMIT 1
INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('on_sale_version','2.8.24',0)

stdClass Object
(
    [result] => SUCCESS
    [latest_version] => 2.8.15
    [on_sale_version] => 2.8.24
)

Activation: success
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND userUsername='netsrik' LIMIT 1
User exists, checking password.
Old MD5 password.
MD5 password failed to match.
Writing auth fail to log.
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Queries: 10
Memory: 2.6071
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you confirm you only have one user with the username netsrik ?

Yes, there is only the one user with username netsrik, which is the master admin, role ID 2

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you'd set the password field to 5f4dcc3b5aa765d61d8327deb882cf99 then you should be able to log in with password as your password.

I did set the password to 5f4dcc3b5aa765d61d8327deb882cf99in the database and that it what it still is -- I keep double checking

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you editing the correct database?

It's the same one as referenced in the config.php file