<div dir="ltr"><div><div>Can you send all debug output ? <br><br></div>Thanks<br></div>RM --<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 11:08 AM, Haviaras Kostas <span dir="ltr"><<a href="mailto:koshalirod@gmail.com" target="_blank">koshalirod@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hello, I have configure my FreeRadius to work with MySQL, I also add the sqlcounter to count the hours user after the first login.<br></div>Here is my code: <br></div>mods-enabled/sqlcounter:<br><br>sqlcounter checkthetime {<br> sql_module_instance = sql<br> dialect = ${modules.sql.dialect}<br> <br> counter_name = All-Hours-Passed<br> check_name = Max-Hours-Passed <br> reply_name = Session-Timeout <br> key = User-Name<br> reset = never<br><br> $INCLUDE ${modconfdir}/sql/counter/${dialect}/${.:instance}.conf <br>}<br><br></div>checkthetime.conf:<br><br>query = "\<br> SELECT HOUR(SEC_TO_TIME(UNIX_TIMESTAMP() - UNIX_TIMESTAMP(AcctStartTime))) \<br> FROM radacct \<br> WHERE UserName = '%{${key}}' LIMIT 1;"<br><br></div>sites-available/default:<br><br>authorize {<br>....<br><br></div>sql<br><div>checkthetime<br>....<br>}<br><br></div><div>I am getting this message from the debug mode:<br><br>(0) WARNING: checkthetime : Couldn't find control attribute 'control:Max-Hours-Passed'<br><br></div><div>I don't know if I have make any syntax error! Thanks for your attention and time!<br></div></div>
<br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br></div>