Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Ryan Ashbrook Posted June 23, 2015 Posted June 23, 2015 IPS4 uses PHP's built-in session management, with a custom handler. As such, session expiration is controlled by the session.gc_maxlifetime PHP directive, which defaults to 1440 seconds.http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
chilihead Posted June 23, 2015 Author Posted June 23, 2015 @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.
Rymich13 Posted July 1, 2015 Posted July 1, 2015 I tried editing the file but it still times out at 30 minutes. Please advise.
4themusicman Posted July 1, 2015 Posted July 1, 2015 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?
4themusicman Posted July 1, 2015 Posted July 1, 2015 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.
chilihead Posted July 1, 2015 Author Posted July 1, 2015 I would like this back as well. Anyone know if this can be controlled in htaccess?
ctrlbrk Posted July 1, 2015 Posted July 1, 2015 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.
chilihead Posted July 1, 2015 Author Posted July 1, 2015 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.
AndyF Posted July 1, 2015 Posted July 1, 2015 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.
ghinton Posted July 1, 2015 Posted July 1, 2015 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.
AndyF Posted July 2, 2015 Posted July 2, 2015 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.
Management Charles Posted July 2, 2015 Management Posted July 2, 2015 So we can better understand the issue: can you explain what is the problem you're experiencing?
AutoItScript Posted July 2, 2015 Posted July 2, 2015 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 Charles Posted July 2, 2015 Management Posted July 2, 2015 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.
AndyF Posted July 2, 2015 Posted July 2, 2015 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 Charles Posted July 2, 2015 Management Posted July 2, 2015 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.
tjk Posted July 2, 2015 Posted July 2, 2015 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?
AutoItScript Posted July 2, 2015 Posted July 2, 2015 In php.inisession.gc_maxlifetime = 3600In 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' ) );
4themusicman Posted July 2, 2015 Posted July 2, 2015 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.
AutoItScript Posted July 2, 2015 Posted July 2, 2015 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 Charles Posted July 2, 2015 Management Posted July 2, 2015 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
4themusicman Posted July 2, 2015 Posted July 2, 2015 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.
AutoItScript Posted July 2, 2015 Posted July 2, 2015 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.