Quoting Torben Nehmer <[EMAIL PROTECTED]>:

> It seems to me that it is. Have you experimented with rewriting this
> part of the module by hand, checking if on of the given calls works?
> I'd try this one:
> >              php3_error(E_WARNING,"LDAP:  Unable to bind to server: %
> > s",ldap_err2string(ldap->ld_errno));

Torben,

I finally got it working and the hack wasn't too complicated, it
just took me forever to get to the bottom of it.  Here's what I did:

Reading ldap.h from openldap-2.0.7 gave me an understanding of what
LDAP_API_VERSION > 2000 means.  I was also able to confirm that ldap.h
doesn't define the ldap_get_lderrno function.

I then took a look at the ldap.c from php4 where I found the function
call for the newer versions of openldap (ldap_get_option instead of
ldap_get_lderrno) and the parameter list.  Defining:

int lderr;

and calling

ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &lderr);

in each if block was all that was needed after that (obviously, it took
numerous tries at compiling to figure it all out).  Time will tell what
I broke in the process.

Now I have to make sure that I do enough with LDAP through Midgard to
make the effort worthwhile, especially as it turns out that the problem
had nothing to do with Midgard.

Marius

-------------------------------------------------
This mail sent through IMP: webmail.sdfparty.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to