Jump to content

online users

Featured Replies

Posted

In Who's Online, it shows all the users and guests online in the last 30 minutes, is it possible to change the value of time to 60?

thanks

Yes.

Open: /applications/core/widgets/whosOnline.php and find:

array( 'core_sessions.running_time>' . \IPS\DateTime::create()->sub( new \DateInterval( 'PT30M' ) )->getTimeStamp() )

change value 30 to 60 and save

Well that stinks, every time we upgrade we have to re-edit that file. There should be a setting. Thanks for the info though

i tried that too, but after 1 hour it comes back to 20 minutes, so i think there is a limit from IPS or something.

If I recall it's a php limit on how long it tracks a session which is 24 minutes by default. So setting a higher number in the widget won't do anything really.

session.gc_maxlifetime (php.ini)

Edited by AutoItScript

  • Author

If I recall it's a php limit on how long it tracks a session which is 24 minutes by default. So setting a higher number in the widget won't do anything really.

session.gc_maxlifetime (php.ini)

​right.

@Charles or someone plan to add some option for this?

  • Author

someone?..

  • 4 weeks later...

The reason why this matters is that it would look bad to people on the site to think traffic dropped after an upgrade when all that happened was that it was previously counting a longer time. It could be detrimental to a community.

This is the type of thing they don't want you to submit a ticket over but will never address here.

I think I may have this figured out. Just giving it some more time to make sure. I created a file and added session.gc_maxlifetime = 36000 to it to test this(I'll lower it if the test works). You'll have to save that file as either php.ini, php5.ini, or .user.ini depending on what you're using and put that in your root.

It's kept people on the online list for two and a half hours so far without issue.

Just FYI, I'm not an expert at this. I think the risk is low but just wanted to pass it along. I think the biggest risk to this is session hijacking since they have more time.

This whole thing makes me wonder why it isn't programmed to base it on the last time that person was online instead of active sessions. Maybe that's more resource intensive to do it that way? It would provide more flexibility to something like this. 

Edited by theblackelk

If you have root access I would guess you would modify the existing one. 

Nope, it finally did reset.

Last try. I've added php_value session.gc_maxlifetime 36000 to my .htaccess file. Up to over three hours now in the count. Will update tomorrow to say whether or not it worked overnight.

So, that works. 

Archived

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

Recently Browsing 0

  • No registered users viewing this page.