[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
OpenLDAP segfaults with back-perl and DBI - BUG??
Hello,
I am having some trouble with back-perl and DBI and I am beginning to wonder
if it's a bug in OpenLDAP. I have back-perl working and returning some
hard-coded test results back to OpenLDAP. I finally found the format for
the returned results in the c source code for OpenLDAP, so I can now
correctly return entries, attributes & all. So far everything was working
well, until....
I added the code to use DBI and connect to mysql. As soon as the connection
attempt is made, OpenLDAP segfaults. This same connection code works in a
stand-alone perl program run from the command line:
sub init
{
print STDERR "PERL: Init method\n";
# Connect to MySQL
$dbname = "main_db";
$hostname = "199.191.85.35";
$username = "myusername";
$password = "mypassword";
$dsn = "DBI:mysql:database=$dbname;host=$hostname";
$dbh = DBI->connect($dsn, $username, $password) or print STDERR "PERL:
Mysql Connect Error: " . DBI::errstr; # This line causes the segfault
if (defined $dbh) {
return 0;
}
else {
return 1;
}
}
The output from slapd -d -1 looks like:
-- (snip) --
1.2.840.113556.1.4.804 (integerBitOrMatch): matchingRuleUse: (
1.2.840.113556.1.4.804 NAME 'integerBitOrMatch' APPLIES (
supportedLDAPVersion $ mailPreferenceOption ) )
slapd startup: initiated.
PERL: Init method
Segmentation fault
Anyone have any ideas? Bug in OpenLDAP?? This has really got me stumped!
I was so close to being done with this project too! (sigh) :-(