XF 1.2 constantly logged out of admin

jdeg

Active member
The timeout on the admin panel seems incredibly short. I've been getting logged out within seconds, even between running tasks like resetting caches, installing addons, and sending emails. I am using xcache as a datastore cacher and have debug mode enabled. Any ideas?
 

rdn

Well-known member
Are you using this on your /library/config.php ?
Code:
$config['cache']['cacheSessions'] = true;
 

Miguel Dias

Member
Are you using this on your /library/config.php ?
Code:
$config['cache']['cacheSessions'] = true;

While digging into the same problem I found this thread.

I actually getting out from admincp and I have that line of code...

Any suggestions?
 

Mike

XenForo developer
Staff member
If the IP shown in PHP info (admin.php?tools/phpinfo, if you can access that) in the "REMOTE_ADDR" value is not your IP, you need to look for your IP and set it to $_SERVER['REMOTE_ADDR'] in config.php.
 

zagman76

Active member
If the IP shown in PHP info (admin.php?tools/phpinfo, if you can access that) in the "REMOTE_ADDR" value is not your IP, you need to look for your IP and set it to $_SERVER['REMOTE_ADDR'] in config.php.
Hi Mike - in my phpinfo, that IP is not my actual IP - it appears to be a 10.0.0.0/8 IP, within AWS. In my config.php file, do I just add a line that says:
Code:
$_SERVER['REMOTE_ADDR'] = 10.x.y.z;
or do I put my actual ip instead of the 10.0.0.0/8 one? Also, do I have to do this every time my ISP changes my IP, or if I need to access the adminCP when not at home?
 

Mike

XenForo developer
Staff member
You need to find which value in $_SERVER has your real IP and use something like:

Code:
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
Replace the HTTP_X_FORWARDED_FOR with the correct value (it varies by setup).
 
Top