Home » Authentication » Auth_RADIUS » Bug #4481
Incorrect parameter pass to radius_put_int
Details
| Submitted | 2005-05-31 00:16 UTC |
|---|---|
| From | mike at pofp dot com |
| Assigned | mbretter |
| Status | Closed |
| Package | Auth_RADIUS |
| PHP Version | 5.0.4 |
| OS | Windows 2000 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-31 00:16 UTC] mike at pofp dot com
Description:
------------
Trying to use this package, I receive this with every call to the putAttribute function:
Warning: radius_put_int() expects parameter 1 to be resource, null given in c:\php\PEAR\Auth\RADIUS.php on line 186
This parameter is delibrately set to null earlier on line 79.
Reproduce code:
---------------
$racct = new Auth_RADIUS_Acct_Stop;
$racct->addServer($server, 0, $shared);
$racct->putAttribute(RADIUS_USER_NAME,$username);
$racct->open();
$status = $racct->start();
Expected result:
----------------
No error message given
Actual result:
--------------
Error message, although code still seems to work
[2005-05-31 18:00 UTC] mike at pofp dot com
Correction, the code doesn't work after the error message! I took another look at my example code, and obviously it isn't using radius_put_int. Sorry.
[2005-10-16 16:50 UTC] mbretter at php dot net
You must invoke:
start()
before you can put attributes:
$racct = new Auth_RADIUS_Acct_Stop;
$racct->addServer($server, 0, $shared);
$status = $racct->start();
$racct->putAttribute(RADIUS_USER_NAME,$username);