Support How to increase session life time in Xenforo 2.2.4?

DarKMaSK

Loyal Member
Hi friends!
I want to know, how can I increase the session time-out? It seems that it has been pre-configured to 15 minutes or something like that. How can I increase it to 60 minutes?
 
Last edited:
Solution
60 minutes?
library/XenForo/Session.php
PHP:
public function __construct(array $config = array(), Zend_Cache_Core $cache = null, Zend_Db_Adapter_Abstract $db = null)
{
if (empty($config['admin']))
{
$defaultConfig = array(
'table' => 'xf_session',
'cookie' => 'session',
'lifetime' => 3600
);
}
Changing lifetime should increase the session timeout, I'm not sure if it'll do anything to existing sessions though so you might want to wait for some kind of official response
PHP:
'lifetime' => 3600
Change this
But in total you can have a cookie for 60 minutes , Which is valid and legal, I recommend you do not change

Marks-Man

Loyal Member
that's weird , are you on shared hosting ?
Default php config doesn't cause problems with XenForo sessions unless your host has done changes to php.ini.
If you are using VPS which webserver are you using ?


You can change it in your php-configuration on your webserver. Search in php.ini for

Code:
session.gc_maxlifetime()
The value is set in Seconds.
 

DarKMaSK

Loyal Member
Do you mean users' online cookies?
No. Actually what's happening, after a few minutes of inactivity... around 10 - 15 minutes, the Admin Control Panel is kicking me out and I have to log in again. Changing this time is very easy with Joomla, but in Xenforo, I couldn't find that option.
that's weird , are you on shared hosting ?
No. Right now I am in my local pc where I am developing, though my online server is on shared hosting. The development portion is complete for now and I am editing some old posts and that also has been almost complete. I will upload the new forum this week but this problem I am facing from day one when I started experimenting with Xenforo.
You can change it in your php-configuration on your webserver. Search in php.ini for

Code:
session.gc_maxlifetime()
The value is set in Seconds.
I have changed that. Let's see what happens. For these small but important things and security obviously, I like Joomla a lot. But their forum component, Kunena... really sucks. It is still in its primitive design and almost no redesign till 2012. Besides, Joomla installation takes much more space than Xenforo. It is not at all designed for only forum purpose.
 

Marks-Man

Loyal Member
No. Actually what's happening, after a few minutes of inactivity... around 10 - 15 minutes, the Admin Control Panel is kicking me out and I have to log in again. Changing this time is very easy with Joomla, but in Xenforo, I couldn't find that option.

No. Right now I am in my local pc where I am developing, though my online server is on shared hosting. The development portion is complete for now and I am editing some old posts and that also has been almost complete. I will upload the new forum this week but this problem I am facing from day one when I started experimenting with Xenforo.

I have changed that. Let's see what happens. For these small but important things and security obviously, I like Joomla a lot. But their forum component, Kunena... really sucks. It is still in its primitive design and almost no redesign till 2012. Besides, Joomla installation takes much more space than Xenforo. It is not at all designed for only forum purpose.
😉.
I forgot to mention, if your ISP keeps changing IP addresses like mines because they use roundrobin load balancing, the admin panel will keep signing you out, that's why I use VPN😅 Locally you wouldn't face problem unless it is php.ini configuration thing.
Mybb, XenForo, VBulletin do this on purpose.
Wordpress has many powerful plugins compared to joomla, you can find everything for free 😅.
After trying multiple forum softwares, I found out that it's worth to buy XenForo, Powerful and they keep improving.
Mybb, IPB, OTHERS are soo weak compared to XenForo. 😅
 
  • Tags
    session xenforo 2.2.4
  • Back
    Top Bottom