Zen Cart Logo
Forums / General Questions / Forgot Password And It Won't Send A Reset E-mail To Me

Forgot Password And It Won't Send A Reset E-mail To Me

Views: 2,870

Results 1 to 16 of 16
31 Aug 2020, 8:49 AM
#1
cookiemonster avatar

cookiemonster

Zen Follower

Join Date:
Apr 2013
Location:
Wisconsin
Posts:
134
Plugin Contributions:
0

Forgot Password And It Won't Send A Reset E-mail To Me

I had to do a 90-day new password a few days ago. I went to log in today and my password is not working, so I must not remember the one I put in. I tried to request an admin password reset but the e-mail never arrives. Now I'm concerned as I am the only admin. Is there a way, maybe in My PHP Admin or something that I can do to get into my account? Thank you so much for any insight.

1 Sep 2020, 7:06 AM
#3
cookiemonster avatar

cookiemonster

Zen Follower

Join Date:
Apr 2013
Location:
Wisconsin
Posts:
134
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

barco57, THANK YOU SO MUCH! I could not find this on my own search of the forum. The SQL query worked so I could get back in. THANK YOU, THANK YOU, THANK YOU! :-)

1 Sep 2020, 12:02 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,699
Plugin Contributions:
56

Re: Forgot Password And It Won't Send A Reset E-mail To Me

You still have some work to do. You have an email deliverability problem if you're not getting your reset password emails (and that means your customers may not be getting your cart emails either). Take a look here: https://docs.zen-cart.com/user/email/

29 Aug 2024, 9:50 PM
#5
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

swguy:

You still have some work to do. You have an email deliverability problem if you're not getting your reset password emails (and that means your customers may not be getting your cart emails either). Take a look here: https://docs.zen-cart.com/user/email/
I'm not getting reset emails, cant get the quick fix in the zen-cart doc to work, tried adding new user through Myphpadmin, still nothing. My concern is it wont send me a reset email. I have tried adding users with new email addresses, but nothing gets it to work

3 Sep 2024, 4:41 AM
#6
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

log files show this:
[29-Aug-2024 01:58:09 UTC] PHP Notice: Email Error: Could not instantiate mail function.
in /home/bladez5/monstergoped.com/includes/functions/functions_email.php on line 511
[29-Aug-2024 01:58:09 UTC] PHP Notice: Email Error: Could not instantiate mail function.
in /home/bladez5/monstergoped.com/includes/functions/functions_email.php on line 511

that part of that file looks like this starting at 506
//
if ($ErrorInfo !== '') {
$mail_langs = $mail->getTranslations();
if (strpos($ErrorInfo, $mail_langs['recipients_failed']) === false) {
// Don't log SMTP rejected spam; log others
if (!str_contains($ErrorInfo, 'spam content')) {
trigger_error('Email Error: ' . $ErrorInfo);
}
} else {
$log_prefix = (IS_ADMIN_FLAG === true) ? '/myDEBUG-bounced-email-adm-' : '/myDEBUG-bounced-email-';
$log_date = new DateTime();
error_log('Request URI: ' . $_SERVER['REQUEST_URI'] . PHP_EOL . PHP_EOL . $ErrorInfo, 3, DIR_FS_LOGS . $log_prefix . $log_date->format('Ymd-His-u') . '.log');

3 Sep 2024, 5:10 AM
#7
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Forgot Password And It Won't Send A Reset E-mail To Me

johnniejetski2:

log files show this:
[29-Aug-2024 01:58:09 UTC] PHP Notice: Email Error: Could not instantiate mail function.
in /home/bladez5/monstergoped.com/includes/functions/functions_email.php on line 511
[29-Aug-2024 01:58:09 UTC] PHP Notice: Email Error: Could not instantiate mail function.
in /home/bladez5/monstergoped.com/includes/functions/functions_email.php on line 511

that part of that file looks like this starting at 506
//
if ($ErrorInfo !== '') {
$mail_langs = $mail->getTranslations();
if (strpos($ErrorInfo, $mail_langs['recipients_failed']) === false) {
// Don't log SMTP rejected spam; log others
if (!str_contains($ErrorInfo, 'spam content')) {
trigger_error('Email Error: ' . $ErrorInfo);
}
} else {
$log_prefix = (IS_ADMIN_FLAG === true) ? '/myDEBUG-bounced-email-adm-' : '/myDEBUG-bounced-email-';
$log_date = new DateTime();
error_log('Request URI: ' . $_SERVER['REQUEST_URI'] . PHP_EOL . PHP_EOL . $ErrorInfo, 3, DIR_FS_LOGS . $log_prefix . $log_date->format('Ymd-His-u') . '.log');

This looks like a server issue, not a zen cart issue.

Try reading https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#could-not-instantiate-mail-function for some ideas.

4 Sep 2024, 2:40 AM
#8
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

I did a fresh install with no upgrade to the old databse and everything is fine. My other upgrade to an old database had bad dates so I assume this needs to be fixed before I proceed. Any tips for finding and fixing bad dates in a database. My thought is to download the old database and use notepad++ to do a search and replace and then re-upload it

4 Sep 2024, 2:53 AM
#9
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

no change, which makes me think another part of the old db is corrupt besides some date formats

4 Sep 2024, 2:57 AM
#10
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

log file after fixing bad dates:

[04-Sep-2024 02:35:41 UTC] PHP Fatal error: Uncaught Error: Undefined constant "MFA_ENABLED" in /home/bladez5/monstergoped.com/hulk/includes/functions/functions_mfa.php:36
Stack trace:
#0 /home/bladez5/monstergoped.com/hulk/includes/functions/general.php(431): zen_mfa_handler(Array)
#1 /home/bladez5/monstergoped.com/hulk/includes/functions/admin_access.php(380): zen_call_function('zen_mfa_handler', Array)
#2 /home/bladez5/monstergoped.com/hulk/login.php(29): zen_validate_user_login('xxxxxxx', 'xxxxxxx')
#3 /home/bladez5/monstergoped.com/hulk/index.php(16): require('/home/bladez5/m...')
#4 {main}
thrown in /home/bladez5/monstergoped.com/hulk/includes/functions/functions_mfa.php on line 36

4 Sep 2024, 3:00 AM
#11
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

line 36
$mfa_status_of_store = MFA_ENABLED === 'True';
if ($mfa_status_of_store === false) {
return true;

4 Sep 2024, 3:03 AM
#12
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

function zen_mfa_handler(array $admin_info = []): bool
{
if (!isset($_SESSION['mfa'])) {
$_SESSION['mfa'] = [];
}

$user_mfa_data = json_decode($admin_info['mfa'] ?? '', true, 2);

$mfa_status_of_store = MFA_ENABLED === 'True';
if ($mfa_status_of_store === false) {
    return true;
4 Sep 2024, 4:12 AM
#13
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,962
Plugin Contributions:
8

Re: Forgot Password And It Won't Send A Reset E-mail To Me

johnniejetski2:

log file after fixing bad dates:

[04-Sep-2024 02:35:41 UTC] PHP Fatal error: Uncaught Error: Undefined constant "MFA_ENABLED" in /home/bladez5/monstergoped.com/hulk/includes/functions/functions_mfa.php:36
Stack trace:
#0 /home/bladez5/monstergoped.com/hulk/includes/functions/general.php(431): zen_mfa_handler(Array)
#1 /home/bladez5/monstergoped.com/hulk/includes/functions/admin_access.php(380): zen_call_function('zen_mfa_handler', Array)
#2 /home/bladez5/monstergoped.com/hulk/login.php(29): zen_validate_user_login('xxxxxxx', 'xxxxxxx')
#3 /home/bladez5/monstergoped.com/hulk/index.php(16): require('/home/bladez5/m...')
#4 {main}
thrown in /home/bladez5/monstergoped.com/hulk/includes/functions/functions_mfa.php on line 36

you are running a v2.1.x codeset.

v2.1.x is a pre-release. are you sure that is what you want to be running?

the error that you are seeing is due to a missing value in your configuration table that was part of the v2.1.0 update. you can see that here:

https://github.com/zencart/zencart/blob/434da0eb9fa82277a01039ade5fa134f1b410054/zc_install/sql/updates/mysql_upgrade_zencart_210.sql#L79-L80

or here for a fresh install:

https://github.com/zencart/zencart/blob/434da0eb9fa82277a01039ade5fa134f1b410054/zc_install/sql/install/mysql_zencart.sql#L2490

without that value in your database configuration table, things will not work.

5 Sep 2024, 5:58 PM
#14
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

I added that line of code to the database, but no change... I did a fresh install without my old database and it works fine, then I fixed all my date errors in my old database and uploaded it and it stopped working.. admin login stopped allowing me in and no emails to reset it and the trick to get back to Admin, admin doesnt work.

Whats the best way to just bring the products and categories from 1.5.7 to 2.0 or 2.1?

5 Sep 2024, 6:37 PM
#15
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,962
Plugin Contributions:
8

Re: Forgot Password And It Won't Send A Reset E-mail To Me

johnniejetski2:

I added that line of code to the database, but no change...

apparently you did not...

databases have records. they do not have code. code is what you use to add, change and/or delete records (or tables) in the database.

the best way to resolve your problem is to continue moving forward trying to resolve this undefined constant issue. or move backwards to the v20x codeset.

6 Sep 2024, 2:12 AM
#16
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Re: Forgot Password And It Won't Send A Reset E-mail To Me

carlwhat:

apparently you did not...

databases have records. they do not have code. code is what you use to add, change and/or delete records (or tables) in the database.

the best way to resolve your problem is to continue moving forward trying to resolve this undefined constant issue. or move backwards to the v20x codeset.
I used SQL to run that line of code to modify the db records
regardless.
My database does the same thing with 2.0, I can load it and run it without issue on the demo db, but if I try to do the upgrade to my old db I cannot log into admin and no emails for a reset or to customers are sent out and the admin reset from zen-cart docs doesnt work