We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Users always online [Solved] | Forum

Chris
Chris Jul 11 '13
I have noticed that If a user does not logout of their account they remain online. I have checked my CRON job and it seems to be working fine, notifications, messages etc are all being sent and received.

On the oxwall site I am auto logged out after some time. Any ideas?
The Forum post is edited by Alia Jul 18 '13
Alia Team
Alia Jul 15 '13
Chris, for how long do they stay online?
If you Cron is running those users should have been loged out automatically after 30 mins.

30 mins timelimit is set here: ow_system_plugins/base/bol/user_service.php:
method - deleteExpiredOnlineUsers

So check this file as well. You might have set another timelimit there.
Chris
Chris Jul 15 '13
The are staying online all the time, unless they logout of my site. I have checked the file above, the code is as follows, which looks correct to me. Not sure what I can do, my cron seems to be running as it should, as other features of the site are working fine.

    public function deleteExpiredOnlineUsers()
    {
        $timestamp = time() - 30 * 60;

        $this->userOnlineDao->deleteExpired($timestamp);
    }


Alex Philipp
Alex Philipp Jul 15 '13
the same problem on linux server
Alia Team
Alia Jul 15 '13
Chris, can I have your site URL?
And yours as well Alex?
Alex Philipp
Alex Philipp Jul 15 '13
unfortunately, because of private info
Alia Team
Alia Jul 16 '13
Chris, your CRON doesn't seem to run properly. Activity notifications are not coming to my user ( tested).

Do you have ssh access to run CRON manually?
If you do I suggest running it to make sure that it is working.
Alex Philipp
Alex Philipp Jul 16 '13
Aliia, have you got some typical examples to run cron on linux proper way?
Chris
Chris Jul 16 '13
I have my cron setup via Cpanel, see screen shot. I have access to SSH, but not sure what I have to do with it to test.


Alia Team
Alia Jul 16 '13
Chris
Chris Jul 16 '13
I think i got it, all seems to be working fine now. Thanks for your help.

Alia Team
Alia Jul 17 '13
Alex, instruction how to run cron locally given here: http://docs.oxwall.org/install:cron ; were written for Linux based servers.
Alex Philipp
Alex Philipp Jul 17 '13
Thank you, Aliia, already done with that
Alia Team
Alia Jul 17 '13
No luck? User are still staying online?
Alex Philipp
Alex Philipp Jul 17 '13
Its Ok, users are offline after 30 min outside site browsing
Ron Scott
Ron Scott Aug 10 '13
I'm having the same problem, users staying online unless they logout.
I've checked everything in the forums and it all checks out.
Everything on my site works, activity notifications, mail, conformation emails,
everything except logging out inactive members.

ow_system_plugins/base/bol/user_service.php: public function deleteExpiredOnlineUsers()

    {
        $timestamp = time() - 30 * 60;

        $this->userOnlineDao->deleteExpired($timestamp);
    }

My cron is working.

* * * * * wget -q -O /dev/null *******.***/ow_cron/run.php
I took out the -q and received this message every minute so I
would think it's working as it should.

--2013-08-10 12:03:01-- http://********.net/ow_cron/run.php
Resolving******* .net... **.***.**.*
Connecting to *******.net|**.***.**.*|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/html]
Saving to: `/dev/null'

0K 0.00 =0s

2013-08-10 12:03:02 (0.00 B/s) - `/dev/null' saved [0/0]

Any help here would be great, I'm stumped.

dave Leader
dave Aug 11 '13

Ron have you tried a different format for the cron.

 

php -q /home/YOUR cPanel USER NAME/public_html/YOURDOMAIN.com/ow_cron/run.php

 

some servers dont recognize the -O and sometimes will just ignore it and sometimes not and give an error or warning or nothing at all and just wont work.   But i have found that the basic format above works pretty much all the time.  You dont have to use wget always.

 

see this as well.

 

http://www.oxwall.org/forum/topic/10867?page=1#post-56912

 

 

The Forum post is edited by dave Aug 11 '13