Hello Juan, i dont know why and i already ask that in the mailing list. And if you read old question you've got the answer. rlm_sqlcounter is not yet stable (experimental). If you want to setup prepaid internet then use rlm_counter.
question ----- Original Message ----- From: "Juan Pablo Fava" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 22, 2004 8:20 PM Subject: Re: sqlcounter: count=0 ????? > That was the problem, I solved last night reading an old post. I really > apreciate your help. > > But this is not documented in module`s doc file. What is sqlacc3??? > > Thankyou all!!! > > apellido dijo: > > To to change the following : > > > > Try to change the following in your sqlcounter dailycounter and > > montlycounter. > > > > sqlmod-inst = sqlcca3 ----> sqlmod-inst = sql > > > > > > > > ----- Original Message ----- > > From: "Juan Pablo Fava" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, March 20, 2004 10:18 PM > > Subject: Re: sqlcounter: count=0 ????? > > > > > >> Here it is. > >> > >> Thanks! > >> > >> apellido dijo: > >> > can we take a look at your sqlcounter.conf? > >> > > >> > > >> > ----- Original Message ----- > >> > From: "Juan Pablo Fava" <[EMAIL PROTECTED]> > >> > To: <[EMAIL PROTECTED]> > >> > Sent: Saturday, March 20, 2004 10:12 AM > >> > Subject: sqlcounter: count=0 ????? > >> > > >> > > >> >> Hi, the problem is that my instalation of sqlcounter doesn`t work, i > >> >> think > >> >> because the counter returns ZERO!! > >> >> and i don`t know why, because if i execute sql code by hand, i > >> doesn`t > >> >> get > >> >> zero: > >> >> > >> >> radcheck is ok: > >> >> > >> >> mysql> select * from radcheck where username='troll'; > >> >> +----+----------+---------------------+----+-------+ > >> >> | id | UserName | Attribute | op | Value | > >> >> +----+----------+---------------------+----+-------+ > >> >> | 3 | troll | User-Password | == | troll | > >> >> | 5 | troll | Max-Monthly-Session | := | 3600 | > >> >> +----+----------+---------------------+----+-------+ > >> >> 2 rows in set (0.11 sec) > >> >> > >> >> > >> >> mysql> SELECT SUM(AcctSessionTime - GREATEST((1078110000 - > >> >> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE > >> UserName='troll' > >> >> AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '1078110000'; > >> >> > >> > > > +--------------------------------------------------------------------------- > >> > -------+ > >> >> | SUM(AcctSessionTime - GREATEST((1078110000 - > >> >> UNIX_TIMESTAMP(AcctStartTime)), 0)) | > >> >> > >> > > > +--------------------------------------------------------------------------- > >> > -------+ > >> >> | > >> >> 376200 | > >> >> > >> > > > +--------------------------------------------------------------------------- > >> > -------+ > >> >> 1 row in set (0.00 sec) > >> >> > >> >> Now, lets see radiusd output: > >> >> > >> >> > >> >> rlm_sqlcounter: Entering module authorize code > >> >> > >> >> sqlcounter_expand: 'SELECT SUM(AcctSessionTime - > > GREATEST((1078110000 - > >> >> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE > >> >> UserName='%{User-Name}' AND UNIX_TIMESTAMP(AcctStartTime) + > >> >> AcctSessionTime > '1078110000'' > >> >> > >> >> radius_xlat: 'SELECT SUM(AcctSessionTime - GREATEST((1078110000 - > >> >> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE > >> UserName='troll' > >> >> AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '1078110000'' > >> >> > >> >> sqlcounter_expand: '%{sqlcca3:SELECT SUM(AcctSessionTime - > >> >> GREATEST((1078110000 - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM > >> radacct > >> >> WHERE UserName='troll' AND UNIX_TIMESTAMP(AcctStartTime) + > >> >> AcctSessionTime > >> >> > '1078110000'}' > >> >> > >> >> WARNING: Attempt to use unknown xlat function or attribute in string > >> >> %{sqlcca3:SELECT SUM(AcctSessionTime - GREATEST((1078110000 - > >> >> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE > >> UserName='troll' > >> >> AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '1078110000'} > >> >> > >> >> radius_xlat: '' > >> >> rlm_sqlcounter: (Check item - counter) is greater than zero > >> >> rlm_sqlcounter: Authorized user troll, check_item=3600, counter=0 > >> >> <================= HERE !! > >> >> rlm_sqlcounter: Sent Reply-Item for user troll, Type=Session-Timeout, > >> >> value=3600 > >> >> modcall[authorize]: module "monthlycounter" returns ok for request > >> 5 > >> >> <==== NO, IT`S NOT OK!!!! USER CAN`T LOGIN!! :P > >> >> > >> >> > >> >> Some one have an idea about what`s going on here? > >> >> I doesn`t understand the Warning above... > >> >> > >> >> > >> >> Thanks in advance, and excuse my english. > >> >> > >> >> -- > >> >> Juan Pablo Fava > >> >> > >> >> > >> >> > >> >> > >> >> - > >> >> List info/subscribe/unsubscribe? See > >> > http://www.freeradius.org/list/users.html > >> >> > >> >> > >> > > >> > > >> > - > >> > List info/subscribe/unsubscribe? See > >> > http://www.freeradius.org/list/users.html > >> > > >> > > > > > > - > > List info/subscribe/unsubscribe? See > > http://www.freeradius.org/list/users.html > > > > > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html