Jump to content

Where is this in 4.0? Session expiration (in seconds)


chilihead

Recommended Posts

For the thread 'views' problem, it is an easy test.  I just loaded this thread as a logged in user.  I did not load or refresh any other page (so my last URL is this thread, from IPB standpoint).  I then opened a separate browser and viewed this page as a guest, immediately.  It showed "no registered users viewing this thread", so clearly the timeout period for thread viewers is set far, far too low right now, or there is a bug where another piece of content is being loaded after the fact, and is confusing IPB to thinking I am browsing something different.

Two separate issues in my opinion, from the original topic of who's online timeout.

I realized after I posted this may be a result of caching since I tested a guest user.  Would need two active user accounts to really test otherwise.

Link to comment
Share on other sites

  • 1 year later...
On 7/2/2015 at 9:59 AM, AutoItScript said:

In php.ini


session.gc_maxlifetime = 3600

In applications/core/widgets/whosOnline.php change PT30M to PT60M


	public function render()
	{
		/* Do we have permission? */
		if ( !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'online' ) ) )
		{
			return "";
		}

		$where = array(
			array( 'core_sessions.running_time>' . \IPS\DateTime::create()->sub( new \DateInterval( 'PT60M' ) )->getTimeStamp() ),
			array( 'core_groups.g_hide_online_list=0' )
		);

 

 

Also, if you want your online page to show correctly you have to modify the file applications/core/modules/front/online/online.php and do the same thing above.. 

 

Thanks Auto for the tip!

Link to comment
Share on other sites

  • 1 year later...
On 7/2/2015 at 3:59 PM, AutoItScript said:

In php.ini


session.gc_maxlifetime = 3600

In applications/core/widgets/whosOnline.php change PT30M to PT60M


	public function render()
	{
		/* Do we have permission? */
		if ( !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'online' ) ) )
		{
			return "";
		}

		$where = array(
			array( 'core_sessions.running_time>' . \IPS\DateTime::create()->sub( new \DateInterval( 'PT60M' ) )->getTimeStamp() ),
			array( 'core_groups.g_hide_online_list=0' )
		);

 

ipboard 4.3 i dont find PT30M in whosonline .php?

Link to comment
Share on other sites

On 7/2/2015 at 2:36 PM, Charles said:

We are fine adding a setting but I am just explaining the restrictions so everyone understands what we can and cannot do inside our software.

Could you make it two settings, one for the ACP and one for the front end?

Also, I don't know if this is intentional or not, but this is a real PITA. If I have the ACP opened in one tab, open another tab and navigate to the ACP instead of noticing that I have a session already open in the browser, I get the login screen, and when I return to the other tab I get logged out.

 

Link to comment
Share on other sites

  • 1 year later...

I changed 3 settings : 

1 - php.ini --> session.gc_maxlifetime value. Restart httpd after change.
Default : 1440 (24 min.) 
I changed it to : 600 (10 min.)

2 - ACP/Tasks/Onlineusers refresh schedule. This affects only "online users" statistics at ACP. It can be changed manually at ibf_core_tasks database table.
Default : 15 minutes. 
I changed it to : 10 min. 

3 - ACP/Tasks/Clearsessions refresh schedule. It can be changed manually at ibf_core_tasks database table.
Default : 30 minutes. 
I changed it to : 10 min. 


Result :

image.thumb.png.f3dea7dfe7b11947c6b794fceb2bb6f7.png
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...