FreeRADIUS PHP Module rlm_php
aland at deployingradius.com
Fri Mar 28 17:00:18 CET 2008
John Holden wrote:
> Despite earlier discussion on the woes of using PHP scripts to process
> requests, I've been developing a module to embed PHP in a (striking)
> similar approach used by the rlm_python module. Essentially, you can
> define a PHP function for any of the available rlm hooks
> (authentication, authorization, acct, checksimul, proxy, etc), and those
> functions will be called by the embedded PHP interpreter when
> appropriate, returning a status value, and config and reply attributes.
It's likely not hard.
> The result is functional, but not without a few bugs. I must admit my C
> programming skills are a bit rusty, but I believe I've got a reasonable
> first stab at this.
> One of the major problems I seem to be having is properly handling
> threading (it tends to crash unless I start radiusd with the -s option).
You can set the THREAD_UNSAFE flag in the module flags, and the server
core will take care of serializing calls to the module.
> Would anyone be willing to take a look at what I've put together? If
> so, where how should I share the code?
bugs.freeradius.org. Upload a tar file as an enhancement request.
I'm willing to have it on the bug site as a patch. I'm a lot more
worried about integrating it into the server.
More information about the Freeradius-Devel