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

Problem online user | Forum

Matteo
Matteo Nov 10 '11
when users close the internet page continue to see themselves online, but when they disconnect by button "sign out" all is ok.
my cron job is
/usr/local/bin/php /home/kuzbbjvq/public_html/ow_cron/run.php
What is the problem?
Keelan Leader
Keelan Nov 10 '11
Quote from Addenstera via mailboxCron will auto logout user after 30 minutes of inactivity. It doesn't logout it when he closed browser :)
Is that the case with you?

If not, is 
/usr/local/bin/php the correct path to your php?

Mine is simply /usr/bin/php.

How often is your cron running? Every minute like its recommended? If so does your host allow this?

Matteo
Matteo Nov 10 '11
Where i find the correct path "/usr/local/bin/php " ?
Matteo
Matteo Nov 10 '11
Cron will auto logout user after 30 minutes of inactivity. It doesn't logout it when he closed browser :)

Yes is my case!
Matteo
Matteo Nov 10 '11
This is my cron

<style>
           .ow_debug_cont{padding:15px 0;width:80%;margin:0 auto;}
           .ow_debug_body{background:#fff;border:4px double;padding:5px;}
           .ow_debug_cap{font:bold 13px Tahoma;color:#fff;padding:5px;border:1px solid #000;width:250px;margin-top:-20px;}
           .ow_debug_body .notice{background:#fdf403;color:#555;}
           .ow_debug_body .warning{background:#f8b423;color:#555;}
           .ow_debug_body .error{background:#c10505;color:#fff;}
           .ow_debug_body .exception{background:#093dd3;color:#fff;}
           .ow_debug_body .vardump{background:#333;color:#fff;}
           .vardumper .string{color:green}
           .vardumper .null{color:blue}
           .vardumper .array{color:blue}
           .vardumper .bool{color:blue}
           .vardumper .property{color:brown}
           .vardumper .number{color:red}
           .vardumper .class{color:black;}
           .vardumper .class_prop{color:brown;}
       </style>
      
           <div class="ow_debug_cont">
               <div class="ow_debug_body">
                   <div class="ow_debug_cap exception">OW Debug - Exception</div>
                   <table>
                       <tr>
                           <td class="lbl">Message:</td>
                           <td class="cnt">Invalid argument `$subject`</td>
                       </tr>
                       <tr>
                           <td class="lbl">File:</td>
                           <td class="cnt">/home/kuzbbjvq/public_html/ow_system_plugins/base/classes/mail.php</td>
                       </tr>
                       <tr>
                           <td class="lbl">Line:</td>
                           <td class="cnt">119</td>
                       </tr>
                       <tr>
                           <td class="lbl">Trace:</td>
                           <td class="cnt"><pre>#0 /home/kuzbbjvq/public_html/ow_plugins/notifications/bol/service.php(278): BASE_CLASS_Mail->setSubject('')
#1 /home/kuzbbjvq/public_html/ow_plugins/notifications/bol/service.php(251): NOTIFICATIONS_BOL_Service->sendProcess('1', Object(NOTIFICATIONS_CMP_Notification))
#2 /home/kuzbbjvq/public_html/ow_plugins/notifications/cron.php(94): NOTIFICATIONS_BOL_Service->sendNotifications('1', Array, true)
#3 /home/kuzbbjvq/public_html/ow_cron/run.php(75): NOTIFICATIONS_Cron->run()
#4 {main}</pre></td>
                       </tr>
                       <tr>
                           <td class="lbl">Type:</td>
                           <td class="cnt" style="color:red;">InvalidArgumentException</td>
                       </tr>

                   </table>
               </div>
           </div>
Keelan Leader
Keelan Nov 10 '11
So when they close window after 30 minutes, does it keep them logged in?
Matteo
Matteo Nov 11 '11
When user close the page, after 30 minutes is logged out.
Michael Leader
Michael Nov 11 '11
Sounds like normal operation.
Anyone know where the session timeout is stored and can we change it?

The Forum post is edited by Michael Nov 11 '11
Keelan Leader
Keelan Nov 11 '11
Not sure Michael i asked Addenster but he never replied to that ha. More than likely in the cron.php, functions or includes ..?

Yep sounds like normally operation to me.

I want to change it too because people can still chat to people that have already closed the browser.
The Forum post is edited by Keelan Nov 11 '11
Matteo
Matteo Nov 11 '11
Change timeout is not possible... Other solution?
Keelan Leader
Keelan Nov 11 '11
Isn't one your script is doing exactly what it is programmed to do.
David Maupin
David Maupin Nov 22 '11
I am having a problem with the users staying logged in if they close their browser. I have checked the cron setup and am pretty sure it is set-up properly. I followed the instructions in the documentation area and received emails that cron was running, then I entered the command to stop the emails. Users were not logged out even a day later with any of these settings. Does any one have any other suggestions.
Keelan Leader
Keelan Nov 23 '11
Does your host allow 1 min cron jobs? I know my host didnt even though i had email that it was running. But they had a min limit of 15 mins.
David Maupin
David Maupin Nov 26 '11
I checked with my hosting company and yes 1 min cron jobs are allowed. I have 5 users logged in some of them have been logged in for weeks now.
Michael I.
Michael I. Nov 29 '11
RewriteCond %{REQUEST_URI} !/ow_cron/
This line allows running Cron commands via HTTP protocol, though in our Cron set up manual it is recommended to run Cron commands via SSH. It is not critical, so maybe information Slash shared would be helpful. Thanks for sharing.
Mark
Mark Nov 29 '11
look for 

$action = ACTIVITY_BOL_Service::getInstance()->findLastOne('user-edit', $userId, $userId);
        if ( $action !== null )        {            $timeLimit = 60 * 30; // 30 minutes
            if ( time() - (int) $action->getTimestamp() >= $timeLimit )            {                $action = new ACTIVITY_BOL_Action();            }        }



in file home>ow_system_plugins>base>init.php
Michael Leader
Michael Dec 2 '11
Best thing to do is to create a second development site and make the changes...  If it does work backup your site and make the change.

Do remember the next core update may overwrite your changes and you will have to re-edit the file so make a note of any custom work you do so you can reapply it.
David Maupin
David Maupin Dec 2 '11
Mark,

I checked my init file and the script that you mention is in fact there to the letter.

Thanks for trying though, I appreciate it.
Michael I.
Michael I. Dec 4 '11
David, did you try running Cron commands via SSH on your server? Did it give you any errors?
David Maupin
David Maupin Dec 10 '11
Thanks every one for all the help I finally got it working properly after changing the directory. my site is installed in a folder inside the public_html folder. I feel like such a fool after many hours trying figure out the problem. I had to change the command from /usr/local/bin/php /home/your-site-root-dir/public_html/ow_cron/run.php to /usr/local/bin/php /home/your-site-root-dir/public_html/home/ow_cron/run.php.
The Forum post is edited by David Maupin Dec 10 '11
Pages: 1 2 »