Keeps logging users out

ave
User ww
User ww
Posts: 21
Joined: Wed Jul 12, 2017 12:18 pm

Keeps logging users out

Post by ave »

Hello Axe,
first of all - you made a great plugin, thank you for that. But, it is so frustrating - for a year now I constantly experience random logouts, and other users report the same problem to me.

I tried every single trick I could find - with no success. PhpBB cookies are fine (.domain.com), secure is checked, and also the same settings are in wordpress (domain name is .domain.com). All throughout the site https is forced, so it is not http/https problem.

So, logout happens when I login, and leave for a few minutes. Then I return to site index, click on latest topic (widget), and already I can see in my inspector (applications -> cookies) that phpbb3 _k cookie is empty. Also, phpbb3 _sid is not empty, but has value that doesn't exist in my database (phpbb_sessions table). So, basically, at that moment - I am logged out.

I changed phpBB security settings, removing "Session IP validation" and "Validate Referrer". No effect.

I should mention that everything works perfectly well while I surf just through wordpress side - there is no sudden logout. The same thing happens when I visit my forum directly and surf there without going back to wordpress - no logout. That made me believe that the problem lays in w3.

Thank you for any suggestion because I am running out of ideas...
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Keeps logging users out

Post by axew3 »

Hello!
So, logout happens when I login, and leave for a few minutes
When you login in phpBB OR using wordpress login OR both? You noted this?
As i understand you do not use iframe mode. Or yes?
When you login via wordpress, the same happen?
Which are in wordpress, plugins that interact with wordpress login?
ave
User ww
User ww
Posts: 21
Joined: Wed Jul 12, 2017 12:18 pm

Re: Keeps logging users out

Post by ave »

axew3 wrote: Sun Mar 03, 2019 9:53 pm When you login in phpBB OR using wordpress login OR both? You noted this?
As i understand you do not use iframe mode. Or yes?
When you login via wordpress, the same happen?
Which are in wordpress, plugins that interact with wordpress login?
Both logins - the same result.
I dont use iframe, no.

Only plugin that could have cause trouble was w3 total cache, but I tried disabling it and the problem remained...
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Keeps logging users out

Post by axew3 »

a stupid thing: is the remember me login setting active option ON in phpBB acp cookie settings?

thinking how can be possible that the phpBB_k cookie resetted...
i neglected this that is the clue sorry
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Keeps logging users out

Post by axew3 »

can you check if immediately after a login in wp side with remember me option, the k cookie is filled or not?
Because this is the problem. If this cookie isn't filled, the login isn't a remember me login, when session expire then you are logged out.
ave
User ww
User ww
Posts: 21
Joined: Wed Jul 12, 2017 12:18 pm

Re: Keeps logging users out

Post by ave »

Thanks for quick reply!
So, last night I changed session duration time (in phpbb admin) to 7200 seconds. This morning I visited site index (WP side) and I was still logged in. Next click was some topic on forum (still logged in), but I could see in inspector that _k cookie was empty. So, naturally, next click anywhere resulted in logout.

About what you asked: "Remember me" is checked...

Second question - I tried going to WP side and login there though widget - and _k cookie was there after login. But, I think that login was done though phpBB side. So, I tried to login through /wp-admin link, and without visiting phpBB - inspector showed that _k cookie was there. Why on earth would it dissappear, it's beyond my comprehension...
Locked