Fix: replace ldaps:// by ssl://
This commit is contained in:
parent
0013e9d83b
commit
890d0b6685
@ -738,6 +738,11 @@ class Ldap
|
||||
*/
|
||||
function serverPing($host, $port=389, $timeout=1)
|
||||
{
|
||||
// Replace ldaps:// by ssl://
|
||||
if (preg_match('/^ldaps/',$host)) {
|
||||
preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs);
|
||||
$host = 'ssl://'.$regs[1];
|
||||
}
|
||||
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
||||
if (!$op) return false; //DC is N/A
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user