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

Re: LDAP 2.0 CVS and php4 ...



At 10:46 AM 8/25/00 -0700, Anthony Brock wrote:
>While attempting to compile an Apache web server with an ldap (2.0cvs) enabled php4 (the latest version off their web site), I encountered a minor but annoying error.  Basically, the php4 source code references a function as:
>
>ldap_get_lderrno(ldap, NULL, NULL)

We don't provide this function.  It's likely the php4 source code
needs to be updated to be compatible with 2.0 API which is based
upon the (expired) IETF LDAPext LDAP C API I-D.

>php4 compiles without errors using this function,
>but when linking with the Apache web server, I get a linker error.  If I change all references from the above to:
>
>ldap_result2error(ldap, NULL, NULL)
>
>it appears to function normally.  Is this the correct substitution?

no.  Use ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &lderr );

>Also, is this a php4 error, or should ldap-2.0 have a macro to fix this? 

Neither.  PHP was likely designed to support the Netscape/Mozilla API
and/or the OpenLDAP 1.x/U-MICH 3.3 API.  PHP likely needs to be updated
to support the OpenLDAP 2.x.

>If it is a php4 error, then I will redirect this message to them.  However, assuming they are using a standard API, it might a good idea to create an appropriate macro.

There isn't a standard LDAP C API.  There is RFC 1823 (informational)
which, for the most part, OpenLDAP 1.x/U-Mich 3.3 are compatible with.
There is an expired IETF I-D which OpenLDAP 2.x is, for the most
part, compatible with.  And there vendor APIs which are somewhere
in between (or even closer to the expired IETF I-D).

We're hope the IETF updates RFC 1823 so that LDAP implementors
have a referencable specification to converge upon.   Until then,
we'll try to follow applicable I-Ds where and when it makes sense.
But one has to remember I-Ds are 'works in progress'....