If you are constantly getting the errormessage:
Fatal error: Unknown function: radius_auth_open() in...
And your Server is a Windows-System (for example standard-xampp installation), you propably did not remove the comment symbol ";" in front of "extension=php_radius.dll" in php.ini.
If you did that, but get the error anyway:
Additionally be sure you edited the right php.ini, since xampp installs several php.exe's but only "xampp/apache/bin/php.ini" is the correct one!
It did cost me 2 days to find that out!
Radius Funktionen
Contact Information
If you have comments, bugfixes, enhancements or want to help to develop this you can send me a mail at » mbretter@php.net.
Inhaltsverzeichnis
- radius_acct_open — Creates a Radius handle for accounting
- radius_add_server — Adds a server
- radius_auth_open — Creates a Radius handle for authentication
- radius_close — Frees all ressources
- radius_config — Causes the library to read the given configuration file
- radius_create_request — Create accounting or authentication request
- radius_cvt_addr — Converts raw data to IP-Address
- radius_cvt_int — Converts raw data to integer
- radius_cvt_string — Converts raw data to string
- radius_demangle_mppe_key — Derives mppe-keys from mangled data
- radius_demangle — Demangles data
- radius_get_attr — Extracts an attribute
- radius_get_vendor_attr — Extracts a vendor specific attribute
- radius_put_addr — Attaches an IP-Address attribute
- radius_put_attr — Attaches a binary attribute
- radius_put_int — Attaches an integer attribute
- radius_put_string — Attaches a string attribute
- radius_put_vendor_addr — Attaches a vendor specific IP-Address attribute
- radius_put_vendor_attr — Attaches a vendor specific binary attribute
- radius_put_vendor_int — Attaches a vendor specific integer attribute
- radius_put_vendor_string — Attaches a vendor specific string attribute
- radius_request_authenticator — Returns the request authenticator
- radius_send_request — Sends the request and waites for a reply
- radius_server_secret — Returns the shared secret
- radius_strerror — Returns an error message
Radius Funktionen
andac dot aydin at code64 dot de
07-Jul-2006 05:32
07-Jul-2006 05:32
shaun at verticalevolution dot com
27-Apr-2006 05:03
27-Apr-2006 05:03
To expand on the simple example by jengo at phpgroupware dot org you can add a NAS IP address to the request by using:
radius_put_addr($radius, RADIUS_NAS_IP_ADDRESS, '127.0.0.1');
and not radius_put_attr or radius_put_string. I also had to use radius_put_string for the user name and password.
brett at silcon dot com
13-Jan-2006 07:20
13-Jan-2006 07:20
Here's a longer example that DOES do Challenge Response and works with SecurID Authentication Managers.
http://www.webtrotter.com/securid_radius.txt
(script wouldn't let me post it because of the long lines, plus it was too long of an example).
jengo at phpgroupware dot org
24-Oct-2005 05:26
24-Oct-2005 05:26
Here is a simple example on how to auth against radius. Note: This doesn't handle challenge responses.
$radius = radius_auth_open();
if (! radius_add_server($radius,'localhost',0,'radiussecret',5,3))
{
die('Radius Error: ' . radius_strerror($radius));
}
if (! radius_create_request($radius,RADIUS_ACCESS_REQUEST))
{
die('Radius Error: ' . radius_strerror($radius));
}
radius_put_attr($radius,RADIUS_USER_NAME,'username');
radius_put_attr($radius,RADIUS_USER_PASSWORD,'password');
switch (radius_send_request($radius))
{
case RADIUS_ACCESS_ACCEPT:
echo 'GOOD LOGIN';
break;
case RADIUS_ACCESS_REJECT:
echo 'BAD LOGIN';
break;
case RADIUS_ACCESS_CHALLENGE:
echo 'CHALLENGE REQUESTED';
break;
default:
die('Radius Error: ' . radius_strerror($radius));
}