Rusty Tucker said:
> I'm trying to get the LDAP addressbook feature of SquirrelMail to work
> on my OS X Server 10.2.2 system. I've used the configure script to
> specify an LDAP server yet when I do searches it never finds any
> entries. I've noticed that there have been other folks thave have had
> similar problems, yet I've not seen any replies on how to get LDAP to
> work.
>
> Thanks in advance for any suggestions.
Hello
I suppose you are talking about the pluging "ldapquery.1.6-1.2.5". I had
problems with this pluging too. But now everything works perfect after I
fix it.Two things were wrong:
1) You need "register_globals = On" in your php.ini. This pluging does not
work with this off.
2) The last installation of openldap we have, uses only ldap version 3.
The pluging (php) does talk ldap version 2 as default, so I had to change
a little the code in the file ldapquery.php. These lines had to be
inserted in the code:
------------------------------------------------------------------------------------
if (ldap_set_option($ldq_ldap, LDAP_OPT_PROTOCOL_VERSION, 3))
echo "Using LDAPv3<BR>";
else
echo "Failed to set protocol version to 3<BR>";
-------------------------------------------------------------------------------------
I send you some of the code around these lines so you can find the right
place to insert it:
------------------------------------------------------------
// connect to LDAP server
if (!($ldq_ldap=ldap_connect($ldq_Server,$ldq_Port))) {
print ("Could not connect to LDAP server " . $ldq_Server);
continue;
}
if (ldap_set_option($ldq_ldap, LDAP_OPT_PROTOCOL_VERSION, 3))
echo "Using LDAPv3<BR>";
else
echo "Failed to set protocol version to 3<BR>";
//attempt to bind to LDAP server
if ($ldq_authreqd) {
if (!ldap_bind($ldq_ldap, $ldq_rdn . ", " . $ldq_base,
$ldq_pass)) {
print ("Unable to bind to LDAP server<BR>\n");
continue;
}
} else {
if (!ldap_bind($ldq_ldap)) {
print ("Unable to bind to LDAP server<BR>\n");
continue;
}
}
foreach ($ldq_attributes as $attr) {
$ldq_tattr[] = $attr;
}
------------------------------------------------------------------
Let's hope this helps.
Sincerely
Rafael Martinez
University of Oslo
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users