Can i do that?

Kostas Kalevras kkalev at
Fri Apr 6 22:14:35 CEST 2007

O/H apolyxrono έγραψε:
> Hi list,
> I have freeradius-1.1.3 doing accounting with mysql. I am thinking to
> create 2 or 3 new tables in the radius db for my purposes and write in
> them the info i want every time freeradius writes data to the other
> tables (nas ,radcheck ,radacct etc.).
freeradius only writes to radacct. It assumes someone else has written 
to nas/radcheck.

>  Is it possible to do that ? If yes
> how ? If yes is it possible to do it using php scripts and not perl (for
> example to call a php script to update my tables every time freeradius
> writting accounting data in the radius db)
> Thanks a lot
> - 
> List info/subscribe/unsubscribe? See
You can:

1. Use sql triggers if your sql server supports them
2. Just create 2-3 more sql module instances that will execute the 
queries you want
3. Create an external php script to do that. That will be slower though 
since you 'll have to execute it on every request and create a new sql 
connection (sql module uses a connection pool).

I would suggest 2-1-3 (in that order).

Kostas Kalevras
Network Operations Center - National Technical University of Athens

More information about the Freeradius-Users mailing list