Jump to content

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


chilihead

Recommended Posts

@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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :) 

 

Link to comment
Share on other sites

  • Management

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • Management

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 :) 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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...