XF 1.1 Keep logging out of XF with Chrome

Andy.N

Well-known member
I noticed this as well in ACP and my members told me about getting logged out of XF (beta 5) using Chrome browser.
I don't notice the problem with forum home since I have selected "Stay logged in" but when I log in the ACP, and under one minute, while I'm trying to perform some task, it pops up that I need to log in to do that.
This just happens in beta 4, 5 and I have the js/data folder loads from CDN.

Is there an option where we can select how long a member is logged in?
 
what is bandaid ?!

I posted it previously:

3) Your server is behind a proxy that is messing up reporting of the client IP address. You can visit this page in your Admin CP to check the IP reporting:

admin.php?tools/phpinfo

Make sure REMOTE_ADDR shows your correct IP. If it's not correct then you can contact your host or server person to fix this. Or look for a server variable that contains the correct IP and then add this code to your library/config.php file:

Rich (BB code):
// FIX IP ADDRESS FOR PROXY
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];

Replace the red part with the name of the server variable that contains the correct IP (from your phpinfo).

Click the quote to expand.
 
2) A problem with cookie scope due to inconsistent forum links. All internal links are consistent, but user-submitted links (e.g. in posts) and links from addons and other customizations may be inconsistent. For example, if you login to the forum with a URL that has "www" but then visit a link without "www" then the login cookie can go out of scope which causes the user to be logged out. It is important that all links and bookmarks are consistent. You can add a rewrite rule to your .htaccess file to enforce no www and thereby avoid the potential problem of inconsistent links:

Rich (BB code):
RewriteEngine On

RewriteCond %{HTTP_HOST} !^yoursite\.com$
RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301,L]

If the forum and .htaccess file is in a subdirectory then you need to specify that in the rules:

Rich (BB code):
RewriteEngine On

RewriteCond %{HTTP_HOST} !^yoursite\.com$
RewriteRule ^(.*)$ http://yoursite.com/forum/$1 [R=301,L]

Thank you for this, it solved my mystery. It all makes sense now why it would only sometimes remember me.
 
Option 3 worked for my issue:

3) Your server is behind a proxy that is messing up reporting of the client IP address. You can visit this page in your Admin CP to check the IP reporting:

admin.php?tools/phpinfo

Make sure REMOTE_ADDR shows your correct IP. If it's not correct then you can contact your host or server person to fix this. Or look for a server variable that contains the correct IP and then add this code to your library/config.php file:

Rich (BB code):
// FIX IP ADDRESS FOR PROXY
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
Replace the red part with the name of the server variable that contains the correct IP (from your phpinfo).
 
Top Bottom