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

Re: (ITS#7169) When using protocol address, port parameter is ignored on connect

--On Thursday, February 16, 2012 5:02 PM +0000 marcel.esser@gmail.com wrote:

> Full_Name: Marcel Esser
> Version: 2.4
> OS: Ubuntu Lucid
> URL: http://pastebin.com/TzNGmUCL
> Submission from: (NULL) (
> When passing a protocol address (i.e. "ldap://"; instead of a
> plain hostname/IP address, i.e. "" to libldap, connect seems to
> ignore the port number parameter and always use 389/636 instead.
> Issue with libldap 2.4 on Ubuntu Lucid. Note that in the example below,
> the PHP wrapper for libldap passes the strings on to the library
> unmodified. Detail system information is at the bottom. Linked against
> /usr/lib/libldap-2.4.so.2

I don't see a bug here.  You are using two different methods:

1) The first method is using a URI.  A URI includes the port, or defaults 
to 389/636, depending on the URI protocol.  For example, ldap:// 
is treated as ldap://  If you want to use a URI with a 
different port, then include the port as part of the URI.

2) The second method is composed of a hostname/IP address, and a port. 
Since it is not a URI, these two separate pieces are required to be passed 

Essentially, if you are going to use a URI, then use it correctly and pass 
in the port as a part of the URI string.  Passing in a URI with a separate 
port parameter that is not part of the URI is not valid.



Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
Zimbra ::  the leader in open source messaging and collaboration