www.chilliwave.com

Wifi Network Distribution and Billing Server
It is currently Sat Jan 18, 2020 10:38 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 105 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
 Post subject:
PostPosted: Sun Aug 02, 2009 6:32 am 
Offline

Joined: Thu Mar 06, 2008 6:17 pm
Posts: 809
Location: Ansbach, Germany
I just copied the expiration it shows me for the user in a unix time stamp calculator and came up with this, Sun, 2 Aug 2009 15:19:44 UTC. This doesn't seem to line up with when the person first logged in on a 2 day sale. I'll have to check my math and see what's up.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 3:28 pm 
Offline
User avatar

Joined: Thu Sep 11, 2008 11:07 pm
Posts: 616
Location: Australia
I just tested this with a 1 hour prepaid ticket, logged in and out and the expiry time worked and knocked me off after 1 hour. I'm assuming your using the online purchased tickets so I'll test one of them later when I get a chance in case there's something different there.

_________________
What I need is an exact list of specific unknown problems we might encounter.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 1:30 am 
Offline
User avatar

Joined: Thu Sep 11, 2008 11:07 pm
Posts: 616
Location: Australia
I've just had one 1 hour ticket that was a single use not terminate after the hour. It instead worked like a multi use ticket and ended after 3 logins and I had to use up all the time. It ran for an overall period of just over 5 hours but only 1 hour online. I cant find anything unusual about the account in the datasbase just that it lost carrier on first login after 30 minutes. There were 2 other 1 hour tickets created in the same batch that went through around the same time and they both worked as single use ticket so it's not a creation problem with the accounts.

_________________
What I need is an exact list of specific unknown problems we might encounter.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 11:41 am 
Offline
User avatar

Joined: Thu Feb 28, 2008 8:33 am
Posts: 858
Location: Odessa TX
we found the problem last night and we are working on the solution today.

_________________
Steve

Yes, I'm a PC and I run great on LINUX.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 12:23 pm 
We have the fix and if you want to try it out, go to
admin/delrecords.php

On about line 78 make the WHERE clause look like

Code:
WHERE UserName = '$user' AND AcctStopTime = 0 ";


I added the AND so it only targets the stop time being 0's

With out the AND it was updating ALL of the stop times for the user.

Chuck has not yet given the thumbs up but if you want to give this a try, feel free.


Top
  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 2:43 pm 
Offline
User avatar

Joined: Thu Sep 11, 2008 11:07 pm
Posts: 616
Location: Australia
Thanks guys I've done that and will watch how it goes today.

_________________
What I need is an exact list of specific unknown problems we might encounter.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 4:02 pm 
Offline
User avatar

Joined: Thu Sep 11, 2008 11:07 pm
Posts: 616
Location: Australia
I've had another one like this today before I applied the fix and it was a lost carrier too so looks like you might be on to the source of it. :) I'll keep an eye out for more today.

_________________
What I need is an exact list of specific unknown problems we might encounter.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 4:35 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 17, 2006 4:52 pm
Posts: 4413
Location: Bend, Oregon
Here is the fix for the rest of you.. You can either do the line changes that Loren posts above, or you can just login with putty as root user again and do this command...

wget http://auth1.ilovemywimax.com/update/delrecords.txt -O /var/www/admin/delrecords.php

I rolled this fix into that file, so if you just copy it over again it will cap off only the last stale session instead of every single entry with this username..

Chuck


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 9:20 pm 
Offline
User avatar

Joined: Fri May 23, 2008 2:23 am
Posts: 340
Thanks Chuck, Will this work as a cron job, or do we have to manually run it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 04, 2009 9:33 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 17, 2006 4:52 pm
Posts: 4413
Location: Bend, Oregon
Bruce... That delrecords.php file already runs every 5 minutes in a loop that is called by another file..

/var/www/admin/delete_records.sh

That file launches at bootup and runs in a 5 minute loop already, which is why we added this chunk of code to the delrecords.php file..

So no, you do not need to call this file manually or run it in a cron job.. It is already running itself every five minutes anyway..

Chuck

p.s.: This fix will not correct the past accounts the last one messed up... All it will do is fix the problem from here forward.. No way around that..


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 05, 2009 1:11 am 
Offline
User avatar

Joined: Fri Feb 13, 2009 11:04 pm
Posts: 133
Location: Florida
I have followed this fix and have made the suggested fixes as they were released.

Comparing the delrecords.php file released tonight and the one I have on the server there are two changes. The one that Loren gives a few posts back...
Quote:
WHERE UserName = '$user' AND AcctStopTime = 0 ";

and in the new file there is a second change:
Quote:
wget http://auth1.ilovemywimax.com/update/delrecords.txt -O /var/www/admin/delrecords.php

LINE 30 is commented out in the latest delrecords.php file:
Quote:
//include ("./admin/include/database.php");


Which is correct? Is LINE 30 supposed to be commented out?

Sully


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 05, 2009 2:22 am 
Offline
User avatar

Joined: Thu Sep 11, 2008 11:07 pm
Posts: 616
Location: Australia
I've still got a stray one here. This time it ended with a Lost-Session instead of the Lost-Carrier. The user only logged in for 13 minutes but the account is still usable nearly 3 hours later. I've been looking at the change
WHERE UserName = '$user' AND AcctStopTime = 0 ";
and I could see that there would be a problem if there was multiple session from that user. The one I had yesterday before applying the patch only had one session so the patch would have made no difference to that account. I'm wondering if its this update that is causing it now or something else we just didnt notice earlier.

_________________
What I need is an exact list of specific unknown problems we might encounter.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 05, 2009 8:39 am 
line 30 should be commented out but when run as a cron it will not make a difference. It just spits out an error about not including the file but it is already included at the top of the file.

This fix should work for everything because in any instance, if the user has not been updated for 5 minutes + whatever time between cron calls, this will clean up the stale session.

Users get updated every 60 seconds so 5 minutes seems like a good call to detect stale sessions.


Top
  
 
 Post subject:
PostPosted: Wed Aug 05, 2009 8:52 am 
Offline
User avatar

Joined: Fri Feb 13, 2009 11:04 pm
Posts: 133
Location: Florida
Great Loren... thanks for the clarification.

Sully


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 06, 2009 10:02 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 17, 2006 4:52 pm
Posts: 4413
Location: Bend, Oregon
That is why I posted the update..... The file posted there now is the latest file, and I super-imposed it over the old file so people who stumble in and run that update will get the correct file, and not the first one..

If you have run that same line of code again to download the delrecords.php file, then you are good to go..

8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 105 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group