简体   繁体   中英

WordPress Login&&Cookie issue

I'm face some weird issues with WordPress backend, hope you can help me.
So, i have a site with login form. When user logged in and moving through site pages sometimes his session just crushes and he can see page as logged out user, after page reload everything is back to normal.
I've trying to debug this but i cannot find where is issue. Debug log throws a lot errors but no one of them does not related to cookie or session issues, except this :

PHP Warning:  session_name(): Cannot change session name when session is active   

Do you guys have any idea how to debug this issue?
I'm use cloudflare and WP Rocket to caching and serve files, can it be that this caching services causing this issue ?? ( cause i have a lot of problems with them )
Also, I've trying to write in log what is in $_COOKIE array at each page. So when user is logged in, or logged out $_COOKIE array is not empty, but when this error appears user have an empty $_COOKIE array. Do you have any ideas why? So i'll be happy to hear any solutions/ideas. Sorry i cannot attach site link.
PS I'm using Uncode theme witch VComposer


Edit#1 Sorry, the question turned out to be confusing, that's because i cannot understand where is the problem. So i'll try to make this question shorter and easy to understand.
I have a site on WordPress, there is a login form. When user log-in, and start move through pages, sometimes happens that :

Logged in user open new page -> and he became logged out, after he reload page ( or move to another page ) he became logged-in again.

To easy understand, let's see login logs:
At once, user successfully login, then after couple seconds he have another log that tells that he successfully login again.( basically user login, then logout, then login again while he just move through 3 different page )
So the question is:
How can i find where is the problem? What should i check? Debug.log does not have any particular error that can be related with this issue.

在顶部添加wordpress wp-config.php

ob_start();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM