Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: manudevil on January 22, 2023, 06:07:10 PM

Title: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 22, 2023, 06:07:10 PM
Hello,

I want to upgrade my forum from 2.0.19 to 2.1.3. I have copied the forum to my local WampServer, and upgraded it. It worked well, but...
Anytime I try to login, I get this message :
You were unable to login. Please check your cookie settings.
I've searched on this very forum, but nothing works. Have you an idea ?

Thanks in advance.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: Kindred on January 22, 2023, 08:33:42 PM
When you copied, did you change all of the database info, forum paths and urls?
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 23, 2023, 02:34:47 AM
Yes, I did. And globally, it works: I can browse the forum as a guest. But impossible to login...
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 24, 2023, 02:41:36 PM
Sorry to insist, but has someone an idea? I'm stuck, and I won't be abe to upgrade the live version of the forum.  :-\
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: Kindred on January 24, 2023, 11:56:24 PM
Well, your local setup is obviously different from your live site, therefore some of the settings that work on your live site need to be changed.... however, without more information,  it's hard for us to figure out what.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: shawnb61 on January 25, 2023, 12:12:33 AM
Is it happening to just you?  Or everyone accessing the forum?
Have you tried other browsers?
Have you tried clearing your browser cookies?

If none of the above works, you can also try changing the forum's cookie id.  You can do this in repair_settings.php or by editing Settings.php.


Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 25, 2023, 02:29:56 AM
It is the same on other browsers, and the same for other accounts. Same in incognito mode, same after deleting the browser cache and cookies.
To be clearer, my live forum is in 2.0.19. I've installed a local version to try to upgrade it properly to 2.1.3, and figure what is changing between the different PHP versions.
I've installed repair_settings.php too, and trie to change the cookie's id... still the same problem. Still stuck...
My localhost is not open, but if you need some info, I can give you.

Thank you.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: shawnb61 on January 26, 2023, 11:32:35 PM
OK, if you restored your forum from another location to localhost, the other things I'd check are:
 - Inspect any .htaccess files to make sure they don't mention the other forum.
 - Also check for redirects, etc..., make sure it's not doing something like adding www, etc.
 - Is the forum moving from or to a subdomain?  If so, it's possible the cookie settings need to be reset in the db.

If all else fails, I'd truncate the smf_sessions table, clear browser cache again, rename the cookie again, & try again again.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 27, 2023, 11:27:40 AM
Hello,

I've truncated the smf_sessions table, no change.
No redirect found... nor mentions of the other forum, all seems to be clear...

Here are my settings about cookies:

Quote"variable"    "value"
"cookieTime"    "60"
"globalcookies"    "0"
"httponlyCookies"    "1"
"localcookies"    "1"
"samesiteCookies"    "lax"
"secureCookies"    "1"


Do you see any strange value ?

Thank you for your help.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: shawnb61 on January 30, 2023, 02:31:36 PM
Do you have https on your localhost?

If not, you may need to disable secure cookies.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on January 31, 2023, 11:48:49 AM
Quote from: shawnb61 on January 30, 2023, 02:31:36 PMDo you have https on your localhost?

If not, you may need to disable secure cookies.
It seems obvious when you're just looking at it, but...
Man, you're a genius ! My problem is gone !
Thank you !

If one day you activate Karma on this forum, I'll give you so much points...
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: Steve on February 01, 2023, 08:55:26 AM
Marking solved then.
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: manudevil on February 01, 2023, 11:42:58 AM
Quote from: Steve on February 01, 2023, 08:55:26 AMMarking solved then.
Yes ! Thank you !
Title: Re: Upgrade, then "You were unable to login. Please check your cookie settings."
Post by: Steve on February 01, 2023, 06:26:35 PM
You're quite welcome.