Torben and other interested parties,
I've made some progress. I heard back from the pam_ldap people
indicating that it's probably a php3 problem.
> Not a pam_ldap problem, I'd say. pam_ldap looks for that
> symbol, if it doesn't find it, it uses its own private
> version of the function. If php3 is using it, then you
> need to recompile against a version of the LDAP SDK that
> does define it.
>
> -- Luke
> --
> Luke Howard | [EMAIL PROTECTED]
> PADL Software | www.padl.com
Before I got this message back, I got rid of pam_ldap and
recompiled openldap-2.0.7 from scratch, recompiled Apache,
and all the components of Midgard from fresh sources. Same
problem:
Cannot load libphp3.so into server: undefined symbol:
ldap_get_lderrno.
So when I got the above message from padl, the coin finally
dropped. I took a look at where midgard-php (and by extension
php-3.0.18) compiles ldap support and found ldap.c in the
functions directory. Searching for ldap_get_lderrno produced
a number of if structures (six to be exact) of the following
general format:
# if LDAP_API_VERSION > 2000
/* New versions of OpenLDAP do it this way */
php3_error(E_WARNING,"LDAP: Unable to bind to server: %
s",ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL)));
# else
php3_error(E_WARNING,"LDAP: Unable to bind to server: %
s",ldap_err2string(ldap->ld_errno));
# endif
#else
php3_error(E_WARNING,"LDAP: Unable to bind to server: %
s",ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL)));
#endif
So php3 seems to be recognizing the ldap api in openldap-2.0.7 as being
> 2000 (which is accurate), and deciding to change the error definition
to ldap_get_lderrno which, unfortunately, isn't defined in openldap-2.0.7.
I checked with:
nm /usr/local/openldap/lib/libldap.so | grep ldap_get
and the symbol definitely isn't defined. The ldap.c that comes with php4
handles this differently:
#if LDAP_API_VERSION > 2000
int lderr;
/* New versions of OpenLDAP do it this way */
ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &lderr);
return lderr;
#else
return ldap->ld_errno;
#endif
#else
return ldap_get_lderrno(ldap,NULL,NULL);
#endif
I did some more searches on the php-general mailing list and came across
a message advising to use at least php-4.0.2 if one wanted to compile
php with support for openldap-2.0.x. This obviously isn't an option.
Any ideas?
Marius
-------------------------------------------------
This mail sent through IMP: webmail.sdfparty.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]