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

XenForo

Administrative
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
 
Solution

DarKMaSK

Loyal Member
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.
Hmmm....!
Wordpress has many powerful plugins compared to joomla, you can find everything for free 😅.
Yah! That's biggest problem. For every solution in WordPress, I need a plugin. Whereas, Joomla has almost everything you need to make website up & running out of the box and they have the most strict rules for their repository. But unfortunately, that not the case at WordPress. But, if you want a dazzling website, WordPress is way ahead of Joomla and that attracts people. Everybody needs something catchy rather than secured. After all it's a show business.
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. 😅
Yah! phpBB is still prehistoric and IPB really sucks. Even the people who are stick to IPB, most of them pretend to be the 'Elite' class and think that to get help from them, one need to be on his knees and beg. Dickheads!!! 🤬 Though there are a 'Few Good Men' also. But I am happy that at last I have found this forum and you guys. May be online, but it is great to have friends like you. ☺️
 

DarKMaSK

Loyal Member
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
I have changed the php settings and it seems, it is working. But it would be better if there would be an option just like in Joomla, to increase / decrease it from the admin panel.
 

XenForo

Administrative
decrease it from the admin panel
In management you can set to 60 minutes
admin.php?options/groups/users/
Screenshot5fa6ede6e46d35ae.png


But in this tutorial from the core you can change the time
 

DarKMaSK

Loyal Member
  • Tags
    session xenforo 2.2.4
  • Back
    Top Bottom