Jump to content

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


chilihead

Recommended Posts

Posted

@Ryan Ashbrook is that the setting that will remove usernames from the online box when they have not been active for a set period? Because I use a particular setting that works for my forums and don't want to change a global PHP setting.

If that is the setting I am looking for, looks like I can possibly edit the PHP to per URL:
http://markroland.com/blog/set-session-lifetimes/

I like the old setting, and would like to request it back.

Posted

There isn't a way to set this in the ACP? Code is something I don't want to touch. I don't have the tech skills to do that. I also would like to be able to control the time period before you drop off. It seems like the users online lasts longer than the users browsing this forum does.  Can you set this in the ACP at all?

Posted

No. You cannot set this in the ACP at all. 

Well I would then like to request it.  It used to be a setting in the ACP. Code is complicated unless you are a techie and we are not all techies.

Posted

Agreed, this should be configurable.  Moving from an old board to IPB 4, if this setting doesn't match it can give a very negative view from users who think the popularity of the forum has changed.  The last thing I want to deal with after migrating.

Posted

Agreed, this should be configurable.  Moving from an old board to IPB 4, if this setting doesn't match it can give a very negative view from users who think the popularity of the forum has changed.  The last thing I want to deal with after migrating.

Bingo.

Plus, my setting has always worked for me, and I want to keep it.

Posted

You *might* be able to do a php_value in .htaccess or a local php.ini file, depending on your host. I'd ask them the best way to increase it. Think of it like asking to increase your memory limit etc, as its just a php value after all.

Posted

Yeah, I would like to see this configurable as well. I don't like the 30 minute time out. Sure it looks good for number of users online at one time, but that is all.

Posted

I'm assuming its a local value that a host could if they wanted to change (on a shared box) if its something global then they may not be willing to do that given it would effect other accounts.

As a compromise, what about installing the third party 'Members Online Today' ? , and using that instead ? at least that way you'll show a bit more 'activity' if nothing else.

Posted

The issue is that people on v3 used to set the "users online cutoff" to something like 60 minutes. On v4 the who's online widget is hardcoded at 30 mins so it looks like the board is suddenly less popular after upgrade. But that's because even if the widget was customizable then it wouldn't "take" because this is all tied into php session's management/garbage collection which on most hosts is set to the default of 24 minutes (v4 uses php session's management, v3 didn't). So even if you changed the who's online widget to 2 hours, you'd still likely not get an accurate picture.

You're damned if you do, and damned if you don't here. If the widget becomes customizable then people will still have issues because of the underlying php setup.

Personally on my board I've changed the php settings and modified the widget myself to give a 60 minutes option, but people in this thread aren't really up for that. :) 

 

  • Management
Posted

We can add a setting to decrease but not increase the limit. By that I mean if PHP sessions value on your server is set to 60 minutes we can add a setting to say "ignore sessions older than 15 minutes" as an example.

However, there's no way for us to increase the limit because PHP itself will destroy sessions older than whatever your server value is.

Posted

IDK if its something a host would be willing / able to change on a shared box, I would guess it may partly depend on them and partly on if its an individual (ie: they can change it per account like a memory limit if needed) or if its global ie all accounts on that box, in which case I would expect them to not want to change it...

  • Management
Posted

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.

Posted

The issue is that people on v3 used to set the "users online cutoff" to something like 60 minutes. On v4 the who's online widget is hardcoded at 30 mins so it looks like the board is suddenly less popular after upgrade. But that's because even if the widget was customizable then it wouldn't "take" because this is all tied into php session's management/garbage collection which on most hosts is set to the default of 24 minutes (v4 uses php session's management, v3 didn't). So even if you changed the who's online widget to 2 hours, you'd still likely not get an accurate picture.

You're damned if you do, and damned if you don't here. If the widget becomes customizable then people will still have issues because of the underlying php setup.

Personally on my board I've changed the php settings and modified the widget myself to give a 60 minutes option, but people in this thread aren't really up for that. :) 

@AutoItScript would you mind sharing exactly what you had to change in PHP settings as well as the widget, for the folks who have the option available to them?

Posted

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' )
		);

 

Posted

Thanks Charles. One question, we have two issues, one is the online users which is set to 30 minutes.  The other issue is users browsing this thread/forum. That seems to drop off much faster than 30 minutes. Is that controlled somewhere else? We have a linear thread and most people end up on that thread.  People drop off after a minute it seems. 

Posted

That was reported as a bug ages ago but it was closed as working as intended. It only shows users that are looking at that thread right now. If they jump back to the forum index then they don't show up as browsing that thread anymore.

 

  • Management
Posted

That was reported as a bug ages ago but it was closed as working as intended. It only shows users that are looking at that thread right now. If they jump back to the forum index then they don't show up as browsing that thread anymore.

 

Yes that's right. It's always been that way. If they aren't viewing that topic any longer they won't be shown as viewing that topic. That's how it should work :) 

Posted

Thanks AutoitScript although it's not an answer that I wanted. What good is it to show "right now" as in this very moment in time?  

I would like to put in a request that this be adjustable. People are saying where is everyone? No one is showing up on the thread.

Posted

Yes that's right. It's always been that way. If they aren't viewing that topic any longer they won't be shown as viewing that topic. That's how it should work :) 

Yeah I get that. It's just weird that on v3 there were always multiple people showing as browsing, now it's a rarity for it to show anyone but yourself. Maybe I'm imagining it.

Archived

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

  • Recently Browsing   0 members

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