[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: OpenLDAP segfaults with back-perl and DBI - BUG??



Most likely your DBI module depends on a different version of the database
library than the one OpenLDAP slapd is linked with. You will need to
rebuild/reinstall DBI with the correct DB library.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of John Browne

> 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) :-(
>
>
>
>
>
>
>