Redmine.pm不适用于Authen::Simple::LDAP

Redmine.pm不适用于Authen::Simple::LDAP,ldap,perl,windows-server-2012-r2,redmine,Ldap,Perl,Windows Server 2012 R2,Redmine,我正在Windows服务器上使用Bitnami Redmine堆栈。我已经将Redmine配置为使用LDAP身份验证,它可以正常工作。现在我想通过Redmine和LDAP进行SVN身份验证。我可以使用Redmine帐户登录,但不能使用LDAP。在Apache error.log中出现了如下错误: [Authen::Simple::LDAP]无法与dn“REDMINE”绑定。原因:“错误的文件描述符” “REDMINE”是用于LDAP的用户。 这似乎是用Perl编写的Redmine.pm中的一个问

我正在Windows服务器上使用Bitnami Redmine堆栈。我已经将Redmine配置为使用LDAP身份验证,它可以正常工作。现在我想通过Redmine和LDAP进行SVN身份验证。我可以使用Redmine帐户登录,但不能使用LDAP。在Apache error.log中出现了如下错误:

[Authen::Simple::LDAP]无法与dn“REDMINE”绑定。原因:“错误的文件描述符”

“REDMINE”是用于LDAP的用户。 这似乎是用Perl编写的Redmine.pm中的一个问题,但我对Perl知之甚少

我发现了Perl代码的一部分,我认为它导致了错误:

my $sthldap = $dbh->prepare(
          "SELECT host,port,tls,account,account_password,base_dn,attr_login from auth_sources WHERE id = ?;"
      );
      $sthldap->execute($auth_source_id);
      while (my @rowldap = $sthldap->fetchrow_array) {
        my $bind_as = $rowldap[3] ? $rowldap[3] : "";
        my $bind_pw = $rowldap[4] ? $rowldap[4] : "";
        if ($bind_as =~ m/\$login/) {
          # replace $login with $redmine_user and use $redmine_pass
          $bind_as =~ s/\$login/$redmine_user/g;
          $bind_pw = $redmine_pass
        }
        my $ldap = Authen::Simple::LDAP->new(
            host    =>      ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]:$rowldap[1]" : "ldap://$rowldap[0]",
            port    =>      $rowldap[1],
            basedn  =>      $rowldap[5],
            binddn  =>      $bind_as,
            bindpw  =>      $bind_pw,
            filter  =>      "(".$rowldap[6]."=%s)"
        );
        my $method = $r->method;
        $ret = 1 if ($ldap->authenticate($redmine_user, $redmine_pass) && (($access_mode eq "R" && $permissions =~ /:browse_repository/) || $permissions =~ /:commit_access/));

      }
      $sthldap->finish();
      undef $sthldap;

有人能解决这个问题吗?或者可能是标准Redmine.pm的工作替代方案?

问题是我没有通过cpan控制台安装“IO::Socket::IP”和“最新的perl ldap”,并且草莓perl没有将其包括在安装中。在我用下面的CMD命令安装这些命令之后,它工作得很好

> cpan
cpan> install IO::Socket::IP
cpan> install latest perl-ldap