Shawn Powers said:
> I'm that guy that posts over and over... I'll slap myself now. But
> still, the saga continues:
>
> Since LDAP lookups worked on the other machine with 1.2.8, I tried
> installing 1.2.8 on my mandrake 9.0 box. It didn't work, so I tried to
> install 1.3.2 -- same result. THEN, I actually rsync'd the folder from
> the other (working) server into my current mandrake 9.0 machine, and the
> LDAP doesn't work!!!! I'm confident it's not a squirrelmail config, but
> now I wonder if it's PHP problems, apache problems, etc...
>
> Again, no more closer to a solution, but obviously willing to flood the
> list with details. (sorry)
>
Hei
Some weeks ago I had problems with ldap from squirrelmail(1.2.8-9). The
problem was not actually in squirrelmail but in the php/openldap version I
was using.
php4.2.3 uses ldap protocol version 2 as default. Our ldap
server(openldap) talks only ldap protocol version 3. I was not getting
anything from my search in the ldap catalog.
I modified abook_ldap_server.php with these lines and everything works
perfectly now. Maybe you have the same problem.
------------------------------------------------------------------------------
if (@ldap_set_option($this->linkid, LDAP_OPT_PROTOCOL_VERSION, 3))
echo"Talking LDAPv3";
else
echo "Failed to set protocol version to 3<BR>";
------------------------------------------------------------------------------
Here you can see where to put these lines:
------------------------------------------------------------------------------
functions/abook_ldap_server.php
------------------------------------------------------------------------------
/* Open the LDAP server. New connection if $new is true */
function open($new = false) {
$this->error = '';
/* Connection is already open */
if($this->linkid != false && !$new) {
return true;
}
$this->linkid = @ldap_connect($this->server, $this->port);
if(!$this->linkid) {
if(function_exists('ldap_error')) {
return $this->set_error(ldap_error($this->linkid));
} else {
return $this->set_error('ldap_connect failed');
}
}
if (@ldap_set_option($this->linkid, LDAP_OPT_PROTOCOL_VERSION, 3))
echo"";
else
echo "Failed to set protocol version to 3<BR>";
if(!@ldap_bind($this->linkid)) {
if(function_exists('ldap_error')) {
return $this->set_error(ldap_error($this->linkid));
} else {
return $this->set_error('ldap_bind failed');
}
}
$this->bound = true;
return true;
}
-------------------------------------------------
If you are using the ldap pluging to search in a ldap catalog, you will
have det same problem and will have to update the file
plugins/ldapquery/ldapquery.php too. It should not be difficult to find
where in the file you have to introduce the code. Between the connect and
the bind call.
Good luck
Sincerely
Rafael Martinez
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
--
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