<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p>Hi all,</p><div>a big thanks to all developers for freeradius 3!</div><div><br></div><div>Having successfully set it up with mysql, I try hard to get sqlcouter going.</div><div>It is always returning 'noop' because the configured query is not being expanded and executed:</div><p>the only one entry in sqlcounter.conf:<br>sqlcounter expire_on_firstuse {<br>sql_module_instance = sql<br>counter_name = Expire-After-Initial-Login<br>check_name = Expire-After<br>reply_name = Session-Timeout<br>key = User-Name<br>reset = never<br>query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) FROM radacct WHERE UserName='%{${key}}' ORDER BY acctstarttime LIMIT 1"<br>}</p><p>dictionary.local:<br>ATTRIBUTE Expire-After 3004 integer</p><p>debug output:<br>(0) expire_on_firstuse : Entering module authorize code<br>(0) expire_on_firstuse : expand: "%{sql:%{sql:}" -> ''<br>(0) expire_on_firstuse : No integer found in string ""<br>(0) [expire_on_firstuse] = noop</p><p>should look like:<br>(0) expire_on_firstuse : expand: "%{sql:SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) FROM radacct WHERE UserName='testuser' ORDER BY acctstarttime LIMIT 1" -> '1234'</p><div><br></div><div>The query from the configfile with a correct username works as expected at the mysql console and returns an integer.</div><div><br></div><p>Any ideas what is going wrong???</p><div><br></div><div>Thanks and Regards,</div><div>Heinz</div></body></html>