Hi
perl3.pl is my script
It looks like this
#!/bin/perl
# PERL MODULES WE WILL BE USING
use lib "/usr/lib64/perl5/auto/DBI/";
use DBI;
use DBD::mysql;
use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);
use Data::Dumper;
use constant RLM_MODULE_REJECT=> 0;# /* immediately reject the request */
use constant RLM_MODULE_FAIL=> 1;# /* module failed, don't reply */
use constant RLM_MODULE_OK=> 2;# /* the module is OK, continue */
use constant RLM_MODULE_HANDLED=> 3;# /* the module handled the request, so stop. */
use constant RLM_MODULE_INVALID=> 4;# /* the module considers the request invalid. */
use constant RLM_MODULE_USERLOCK=> 5;# /* reject the request (user is locked out) */
use constant RLM_MODULE_NOTFOUND=> 6;# /* user not found */
use constant RLM_MODULE_NOOP=> 7;# /* module succeeded without doing anything */
use constant RLM_MODULE_UPDATED=> 8;# /* OK (pairs modified) */
use constant RLM_MODULE_NUMCODES=> 9;# /* How many return codes there are */
$database="radius";
$user="root";
$pw="";
$dsn = "dbi:mysql:$database:localhost:3306";
$connect = DBI->connect($dsn, $user, $pw);
$myquery=$connect->prepare("SELECT username from admin");
$myquery->execute();
$myquery->bind_columns(undef, \$username);
while($myquery->fetch()) {
print "$username";
}
Its not the one I normally use, but its just for testing. and it works. I get the username value returned to the screen if I run the script
On Thu, Aug 25, 2011 at 4:21 PM, Tyller D <tyllerd@gmail.com> wrote:why /usr/local? did you install DBI manually? Why not use perl-DBI rpm?
>
>> Hi
>>
>> Im trying to run freeradius, using rlm_perl, and centos 6.
>>
>> after installing ( yum install freeradius freeradius-mysql freeradius-perl
>> freeradius-utils ). when I and start free radius I fails with this error
>>
>> Can't load '/usr/local/lib64/perl5/auto/DBI/DBI.so' for module DBI:
>> /usr/local/lib64/perl5/auto/DBI/DBI.so: undefined symbol: PL_memory_wrap at
>> /usr/lib64/perl5/DynaLoader.pm line 200.
>> at /usr/local/lib64/perl5/DBI.pm line 268
>> BEGIN failed--compilation aborted at /usr/local/lib64/perl5/DBI.pm line
>> 268.
>> Compilation failed in require at /etc/raddb/perl3.pl line 6.What's in per3.pl? Does it work without freeradius (e.g. create a test
>> BEGIN failed--compilation aborted at /etc/raddb/perl3.pl line 6.
script which uses functions on perl3.pl that is used by freeradius,
like authenticate and friends)
--
Fajar
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html