Admin panel not accessible after 2.2.8 upgrade

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
postiffm
Forum Members
Forum Members
Posts: 118
Joined: Tue Nov 30, 2010 12:16 am

Admin panel not accessible after 2.2.8 upgrade

Post by postiffm »

After successful upgrade to 2.2.8, the frontend of my website works just fine. But now I can't log into the admin panel. I get this:

This page isn’t working
www.aahcdc.com is currently unable to handle this request.
HTTP ERROR 500

This problem has been going on in one form or another since I upgraded to 2.2.7. At that time, I could get into the panel by trying some different urls or reloading the Chrome tab. See this topic: viewtopic.php?f=8&t=78059.

Now, I cannot get into admin at all.

Any ideas?

[I upgraded another site earlier today, and everything works fine on it. It is hosted on a2hosting. The one in question here is on bluehost.]
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7768
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Admin panel not accessible after 2.2.8 upgrade

Post by Rolf »

Disable .htaccess file
Check/enable PHP error log
Enable debug in core config file
Clear CMS and browser cache
Image
- + - + - + - + - + -
Latest CMSMS tutorial: FormBuilder WatchGuard
- + - + - + - + - + -
Did my post help you solving a problem at your (customers) website and it saved you many hours of work?
Great!! Buy me a cup of coffee in return as a small token of appreciation!
postiffm
Forum Members
Forum Members
Posts: 118
Joined: Tue Nov 30, 2010 12:16 am

Re: Admin panel not accessible after 2.2.8 upgrade

Post by postiffm »

Found something in the error logs:

Code: Select all

[14-Aug-2018 21:44:04 America/Detroit] PHP Fatal error:  Uncaught exception 'phpmailerException' with message 'SMTP Error: Could not authenticate.' in /home1/atwozoom/public_html/aahcdc/lib/phpmailer/class.phpmailer.php:1692
Stack trace:
#0 /home1/atwozoom/public_html/aahcdc/lib/phpmailer/class.phpmailer.php(1540): PHPMailer->smtpConnect(Array)
#1 /home1/atwozoom/public_html/aahcdc/lib/phpmailer/class.phpmailer.php(1335): PHPMailer->smtpSend('Date: Tue, 14 A...', 'There has been ...')
#2 /home1/atwozoom/public_html/aahcdc/lib/phpmailer/class.phpmailer.php(1213): PHPMailer->postSend()
#3 /home1/atwozoom/public_html/aahcdc/lib/classes/class.cms_mailer.php(815): PHPMailer->send()
#4 /home1/atwozoom/public_html/aahcdc/lib/classes/class.usertagoperations.inc.php(305) : eval()'d code(60): cms_mailer->Send()
#5 [internal function]: cms_user_tag_AdminLoginNotification(Array, Object(Smarty_CMS))
#6 /home1/atwozoom/public_html/aahcdc/lib/classes/class.usertagoperations.inc.php(285): call_user_func_array('cms_user_tag_Ad...', Array)
#7 /home1/atwozoom/public_html/aahcdc/lib/c in /home1/atwozoom/public_html/aahcdc/lib/phpmailer/class.phpmailer.php on line 1692
I had previously set up an log event that emails me "There has been a successful login in your Admin panel..." So evidently the password I use has been changed out from under me (by another user?) so the email cannot be sent.

Perhaps as a consequence, logging into the admin panel fails because cmsms cannot send the email about a successful login. If true, that would be an interesting "feature" that has locked me out of the admin panel, which I'd like to get into to fix this problem!

PHP Version 5.6.37

Is this plausible?
postiffm
Forum Members
Forum Members
Posts: 118
Joined: Tue Nov 30, 2010 12:16 am

Re: Admin panel not accessible after 2.2.8 upgrade

Post by postiffm »

Is there a flag I can pass to login.php to have cmsmadesimple start up in "safe mode" so it won't do anything it doesn't have to do, like email an admin login notification?

I know that defeats the purpose of the AdminLoginNotification, but I'm just trying to think of ways to get around this problem.
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7768
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Admin panel not accessible after 2.2.8 upgrade

Post by Rolf »

I tested this, but just to be sure create backup first!!!

Go to database in PHPMyAdmin, open table "cms_event_handlers".
Look for the line(s) "AdminLoginNotification" and delete it/them.
Clear cache, by removing all files in folders /tmp/cache and /tmp/templates_c/

It will detach the UDT from the event(s) in Event Manager.
When you have found the real cause of the mailer problem you have to attach it again.

Hope this helps, Rolf
Image
- + - + - + - + - + -
Latest CMSMS tutorial: FormBuilder WatchGuard
- + - + - + - + - + -
Did my post help you solving a problem at your (customers) website and it saved you many hours of work?
Great!! Buy me a cup of coffee in return as a small token of appreciation!
postiffm
Forum Members
Forum Members
Posts: 118
Joined: Tue Nov 30, 2010 12:16 am

Re: Admin panel not accessible after 2.2.8 upgrade

Post by postiffm »

Rolf--Thank you very much.

That got me in to the admin panel. The AdminLoginNotification UDT and/or interaction with the LoginPost event was unhappy. Bottom line: email authentication was broken somehow to the bluehost smtp server. Once I fixed that problem, then all of this went away.

It would be nice if such a failure would not lock out the CMS admin from his admin panel. Maybe a change to catch and handle that SMTP exception wouldn't be too hard for someone to figure out. That's above my ability...

Details...

At first, I thought it was that the destination $email_address I used was not in the same domain as my website...it had worked for a long time, but perhaps Bluehost changed some setting that broke the UDT. (See https://cmscanbesimple.org/blog/admin-f ... tification)

But I changed the email address to an in-domain address, and it still failed. Then it became a game of cat-and-mouse to see if I could figure out the new settings bluehost wants for sending an email from the website...and chat support rep was of no help.

1. Despite bluehost advertising to the contrary, the destination does NOT have to be in the website's domain.
2. Mailer: mail (not SMTP!)
3. I think the other settings are not relevant. With the SMTP mailer, I had tried all kinds of combinations of ports/TLS/SSL/authentication to no avail. I used the same settings as I successfully use in Thunderbird, and it still didn't work. No idea why.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Admin panel not accessible after 2.2.8 upgrade

Post by calguy1000 »

It would be nice if such a failure would not lock out the CMS admin from his admin panel. Maybe a change to catch and handle that SMTP exception wouldn't be too hard for someone to figure out. That's above my ability..
This "AdminEmailNotification" code is your code that you have tied into CMSMS. It is not CMSMS code. Wherever you got this code from, or developed it yourself, there's nothing the CMSMS team can do about it.

Additionally, there is literally no way that CMSMS could stop errors produced in your embedded code from effecting CMSMS. The embedded code itself should be well behaved in itself to detect and handle errors as much as possible.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
postiffm
Forum Members
Forum Members
Posts: 118
Joined: Tue Nov 30, 2010 12:16 am

Re: Admin panel not accessible after 2.2.8 upgrade

Post by postiffm »

I understand totally where you are coming from, and my mindset is not to argue about it.

Summary of the issue: A mail authentication failure caused CMSMS to not be able to complete the login process because I had attached a UDT to the LoginPost event, which UDT tries to send an email. When the email failed, CMSMS did not complete the login. So, I could not log in as admin.

So, the code in the UDT was bug-free. The problem was that Site Admin | Settings - Global Settings | Mail Settings were not set up correctly.

I just wondered if there was an easy way to make login more robust in the case of a failed LoginPost event. I'll live with it as is for now :-)
Locked

Return to “CMSMS Core”