You mean I need to upgrade to 3.0.3? On Tue, May 13, 2014 at 3:19 PM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 13 May 2014, at 02:31, * <zhex900@gmail.com> wrote:
Hi,
I followed your instructions. Now I get the following errors:
(2) [-sql] = ok (2) [expiration] = noop (2) [logintime] = noop (2) WARNING: pap : Auth-Type already set. Not setting to PAP (2) [pap] = noop (2) dailycounter : Entering module authorize code (2) ERROR: dailycounter : %{sql:SELECT SUM(acctsessiontime) FROM radacct WHERE username = '%{User-Name}' AND acctstarttime BETWEEN FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')} (2) ERROR: dailycounter : ^ Invalid variable expansion (2) [dailycounter] = fail (2) } # authorize = fail (2) Using Post-Auth-Type Reject
/etc/freeradius/mods-enabled/sqlcounter
sqlcounter dailycounter{ counter_name = "Daily-Session-Time" check_name = "Max-Daily-Session" reply_name = "Session-Timeout" sql_module_instance = "sql" key = "User-Name" reset = "daily" cache-size = 5000 query = "SELECT SUM(acctsessiontime) FROM radacct WHERE username = '%{${ key}}' AND acctstarttime BETWEEN FROM_UNIXTIME('%b') AND FROM_UNIXTIME('%e')" }
We fixed quite a few issues with the sqlcounter module in 3.0.3, it should all work now.
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html