News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Updated to 2.1.3, now can't log in

Started by mikeselectricstuff, November 23, 2022, 01:24:17 PM

Previous topic - Next topic

mikeselectricstuff

I have a very small forum,  originally installed with a Softalicious script from my host. Everything is pretty much as default, no extensions, themes etc.

I recently updated to 2.1.3 using the update utility- I don't recall the previous version but may be as old as 2.0.11

Now I can't log in. I get "You were unable to login. Please check your cookie settings"

I've tried 3 PCs and an Android phone. Firefox, Edge and Chrome(android) with the same result.
, clearing cookies on the domain, clearing all cookies, and firefox private browsing mode.

I managed to exit maintainance mode by maunally editing the settings.php file but that's as far as I've got.

I know absolutely nothing about PHP, other than how to download a php file, edit and re-upload using my host's control panel file manager !

May or may not be relevant - Since the original install 10+ years ago,  I have always  had issues with login, in that unless you log in as the first thing you do after navigating to the forum, login fails with no error message. the only way to fix this is to navigate to another site, then back to the forum home URL and login before navigating to any other page on the forum.

settings.php attached ( secret key redacted )

Help!

Doug Heffernan

I removed your Settings.php file because you had left all the database details in it, like the database name, username and password. And that poses a huge security risk.

Steve

Quote from: mikeselectricstuff on November 23, 2022, 01:24:17 PMI recently updated to 2.1.3 using the update utility
What update utility? And did you make backups beforehand?
DO NOT pm me for support!

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mikeselectricstuff

Quote from: Steve on November 23, 2022, 02:35:03 PM
Quote from: mikeselectricstuff on November 23, 2022, 01:24:17 PMI recently updated to 2.1.3 using the update utility
What update utility? And did you make backups beforehand?

Don't recall exactly but I think it was the "softaculous app installer" in my host control panel, which ran the SMF updater. I did have some problems with this initially, giving an error with no description,  but seemed to work without reporting errors after I copied the files from the " large upgrade" package.

Updating was in response from an email from Softaculous that a new update was available, plus earlir that day getting a message from my host about spam apparently from fake registrations, which may have been related, or just a coincidence.

Yes, I downloaded a backup to my local PC, and also selected the backup option during the update process.

Forum is hxxp:electricstuff.co.uk/forum [nonactive]

Steve

For future reference, never use a third-party updater for your forum.

You may have to restore your system, patch up to the latest 2.0.x version (2.0.19) and then upgrade to 2.1.3 ... wait for Kindred and/or Doug to have a look at your forum first though.
DO NOT pm me for support!

m4z

Quote from: mikeselectricstuff on November 23, 2022, 01:24:17 PMMay or may not be relevant - Since the original install 10+ years ago,  I have always  had issues with login, in that unless you log in as the first thing you do after navigating to the forum, login fails with no error message. the only way to fix this is to navigate to another site, then back to the forum home URL and login before navigating to any other page on the forum.

Did the forum change location after the initial setup? If so, check (and fix) the settings with repair_settings: https://download.simplemachines.org/?tools
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

mikeselectricstuff

Quote from: m4z on November 24, 2022, 12:00:07 AM
Quote from: mikeselectricstuff on November 23, 2022, 01:24:17 PMMay or may not be relevant - Since the original install 10+ years ago,  I have always  had issues with login, in that unless you log in as the first thing you do after navigating to the forum, login fails with no error message. the only way to fix this is to navigate to another site, then back to the forum home URL and login before navigating to any other page on the forum.

Did the forum change location after the initial setup? If so, check (and fix) the settings with repair_settings: https://download.simplemachines.org/?tools
No - nothing has ever changed since initially installing, and that issue has been there from day one.

mikeselectricstuff

Quote from: Steve on November 23, 2022, 06:08:02 PMFor future reference, never use a third-party updater for your forum.

You may have to restore your system, patch up to the latest 2.0.x version (2.0.19) and then upgrade to 2.1.3 ... wait for Kindred and/or Doug to have a look at your forum first though.
Pardon my iognorance but Is there a reason I can't do a clean install of the latest version and point it at the existing database ?  or is the issue more likely to be something in the database that didn't get converted properly by the update process ?

Is there any way to get more diagnostics to help narrow down the issue - "unable to log in" is not exactly very helpful...

BTW I did a "check database" in my Host control panel and it found no issues.

mikeselectricstuff

I ran the "repair-settings" tool. the only things that were not in the "recommended" state were :
"Queryless URLS" - setting not found - I set to "off"
"Set SMF Default theme as overall forum default for all users: " - I changed to "on"
"Enable caching" - I set to on.

No difference.

I can't find the backup file that the backup utility supposedly created, and the archive I manually saved won't open with Winzip, so I'm not sure I have a copy of the pre-update version. I'll see if my host can restore from their backups.

This forum is mostly an information resource, with only a couple of posts a month and maybe a dozen active users.
All the info appears to be still there, so it would not be the end of the world if all users had to re-register, if that would be an easy guaranteed fix for this problem.


Doug Heffernan

Quote from: mikeselectricstuff on November 23, 2022, 05:38:51 PMDon't recall exactly but I think it was the "softaculous app installer" in my host control panel

I will echo the advice of my colleague @Steve. Those once click auto installer apps are notoroius for not doing a good job in cases like this. Updates/upgrades are always best done manually.

Quote from: mikeselectricstuff on November 24, 2022, 04:41:05 AMPardon my iognorance but Is there a reason I can't do a clean install of the latest version and point it at the existing database ?

Can you download the large 2.1.3. upgrade package, unzip it and overwrite all your current files and run the upgrader as well. i.e. perform a manual upgrade. That should fix any issues that the auto installer upgrader might have caused. Like that you will be sure that you did a proper upgrade.

Another thing, what custom mods did you have installed? Does the cookie name in the Settings.php file match the one entered in Cookie name under the Cookies and Sessions section in your admin panel?

At the same section, what about the following options, are they enabled and/or disabled?

Enable local storage of cookies

Use subdomain independent cookies

If you can't get to the Admin Panel, you can check those settings in the settings table in the database.

mikeselectricstuff

Quote from: Doug Heffernan on November 24, 2022, 05:27:18 AMCan you download the large 2.1.3. upgrade package, unzip it and overwrite all your current files and run the upgrader as well. i.e. perform a manual upgrade. That should fix any issues that the auto installer upgrader might have caused. Like that you will be sure that you did a proper upgrade.
Did that, no difference. Process appeared to be the same as I did before - I think all the Softaculous thing did was launch the SMF updater. 
QuoteAnother thing, what custom mods did you have installed?
none.
QuoteDoes the cookie name in the Settings.php file match the one entered in Cookie name under the Cookies and Sessions section in your admin panel?

At the same section, what about the following options, are they enabled and/or disabled?

Enable local storage of cookies

Use subdomain independent cookies

If you can't get to the Admin Panel, you can check those settings in the settings table in the database.

Can't get to admin panel as I can't log in.

I know nothing about SQL, but Browsing the database using phpMyadmin tool I see the following cookie related things in smf_settings :

globalcookies 1
localcookies 1
httponlyCookies 1
samesiteCookies lax
cookietime 60

Cookie name in settings.PHP is "SMFCookie32"

A search of the database for "%cookie%" only reveals the above entries, nothing related to cookie name - maybe that's the problem ?
If so, I should be able to figure out how to create it if you can give me the required format.








Kindred

There's at least one problem..     you can't have global and local at the same time
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mikeselectricstuff

Setting globalcookies to 0 seems to have fixed it.
Also seems to have fixed the abovementioned issue of having to log in on the first page

Thanks for all your help!

niddnet

Hi Mike

I have no advice for you (I've just come in with a vaguely similar issue I need help with).

I'm a HUGE fan of your YouTube channel, long-time subscriber; absolutely amazing. 

To think you and I would both have problems with the same forum around the same time... definitely coincidence.

Anyway - thanks for the amazing content; looking forward to the next upload.

Best wishes

Niddnet

Steve

Let's do those kinds of posts in PM, shall we?
DO NOT pm me for support!

niddnet

Got giddy and carried away Steve; apologies.  Normally am much better behaved than that, promise :D

Steve

DO NOT pm me for support!

Advertisement: