Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Cannot Reproduce
-
Affects Version/s: 2.0
-
Fix Version/s: None
-
Component/s: Administration
-
Labels:None
-
Environment:All
-
Database:Any
-
Affected Branches:MOODLE_20_STABLE
Description
php ldap_connect allows to specify a host and port, auth/ldap/lib.php only uses the host part of the call.
In order to make ldap urls of type host:port work, a change like
...
foreach ($urls as $server){
// set default ldap port
$hostport[1]='389';
// handle host:port url
$hostport = explode(:,$server);
$connresult = ldap_connect($hostport[0],(integer)$hostport[1]);
...
in lib.php should be made (my hack works, but there is probably a cleaner way to do it)
From Petri Asikainen (paca at sci.fi) Thursday, 30 December 2004, 06:45 PM:
Hi!
Server hostname and port should be specied as url
like
ldap://hostname:whatever
or
ldaps://hostname:whatever
if you use ssl.
Does that work for you? It should, if your php is compiled agaists openldap...
From Martin Langhoff (martin at catalyst.net.nz) Thursday, 6 October 2005, 10:57 AM:
Confirm that it works without needing any code changes. The PHP LDAP libraries support this natively. Closing.