Hi<br><br><a href="http://perl3.pl">perl3.pl</a> is my script<br><br>It looks like this<br><br>#!/bin/perl<br># PERL MODULES WE WILL BE USING<br>use lib "/usr/lib64/perl5/auto/DBI/";<br>use DBI;<br>use DBD::mysql;<br>
use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);<br>use Data::Dumper;<br><br> use constant RLM_MODULE_REJECT=> 0;# /* immediately reject the request */<br> use constant RLM_MODULE_FAIL=> 1;# /* module failed, don't reply */<br>
use constant RLM_MODULE_OK=> 2;# /* the module is OK, continue */<br> use constant RLM_MODULE_HANDLED=> 3;# /* the module handled the request, so stop. */<br> use constant RLM_MODULE_INVALID=> 4;# /* the module considers the request invalid. */<br>
use constant RLM_MODULE_USERLOCK=> 5;# /* reject the request (user is locked out) */<br> use constant RLM_MODULE_NOTFOUND=> 6;# /* user not found */<br> use constant RLM_MODULE_NOOP=> 7;# /* module succeeded without doing anything */<br>
use constant RLM_MODULE_UPDATED=> 8;# /* OK (pairs modified) */<br> use constant RLM_MODULE_NUMCODES=> 9;# /* How many return codes there are */<br><br>$database="radius";<br>$user="root";<br>
$pw="";<br>$dsn = "dbi:mysql:$database:localhost:3306";<br>$connect = DBI->connect($dsn, $user, $pw);<br><br>$myquery=$connect->prepare("SELECT username from admin");<br>$myquery->execute();<br>
$myquery->bind_columns(undef, \$username);<br><br>while($myquery->fetch()) {<br>print "$username";<br>}<br><br><br>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<br>
<br><br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 1:36 PM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net">list@fajar.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Aug 25, 2011 at 4:21 PM, Tyller D <<a href="mailto:tyllerd@gmail.com">tyllerd@gmail.com</a>> wrote:<br>
><br>
>> Hi<br>
>><br>
>> Im trying to run freeradius, using rlm_perl, and centos 6.<br>
>><br>
>> after installing ( yum install freeradius freeradius-mysql freeradius-perl<br>
>> freeradius-utils ). when I and start free radius I fails with this error<br>
>><br>
>> Can't load '/usr/local/lib64/perl5/auto/DBI/DBI.so' for module DBI:<br>
>> /usr/local/lib64/perl5/auto/DBI/DBI.so: undefined symbol: PL_memory_wrap at<br>
>> /usr/lib64/perl5/DynaLoader.pm line 200.<br>
>> at /usr/local/lib64/perl5/DBI.pm line 268<br>
>> BEGIN failed--compilation aborted at /usr/local/lib64/perl5/DBI.pm line<br>
>> 268.<br>
<br>
</div>why /usr/local? did you install DBI manually? Why not use perl-DBI rpm?<br>
<div class="im"><br></div></blockquote><div><br>I'm not sure why /usr/local. but i originally started freeradius got the error then tried to install via cpan<br><br>Package perl-DBD-MySQL-4.013-3.el6.x86_64 already installed and latest version<br>
Package perl-DBI-1.609-4.el6.x86_64 already installed and latest version<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
>> Compilation failed in require at /etc/raddb/<a href="http://perl3.pl" target="_blank">perl3.pl</a> line 6.<br>
>> BEGIN failed--compilation aborted at /etc/raddb/<a href="http://perl3.pl" target="_blank">perl3.pl</a> line 6.<br>
<br>
</div>What's in <a href="http://per3.pl" target="_blank">per3.pl</a>? Does it work without freeradius (e.g. create a test<br>
script which uses functions on <a href="http://perl3.pl" target="_blank">perl3.pl</a> that is used by freeradius,<br>
like authenticate and friends)<br>
<font color="#888888"><br>
--<br>
Fajar<br>
<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</font></blockquote></div><br><br>Like I said though, it runs fine outside of freeradius - its just when freeradius tries to run it, it fails<br>