phacility/phabricator · error · Exception
Unable to connect to LDAP server (%s:%d).
Error message
Unable to connect to LDAP server (%s:%d).
What it means
Error "Unable to connect to LDAP server (%s:%d)." thrown in phacility/phabricator.
Source
Thrown at src/applications/auth/adapter/PhutilLDAPAuthAdapter.php:317
$profiler = PhutilServiceProfiler::getInstance();
$call_id = $profiler->beginServiceCall(
array(
'type' => 'ldap',
'call' => 'connect',
'host' => $host,
'port' => $this->port,
));
$conn = @ldap_connect($host, $this->port);
$profiler->endServiceCall(
$call_id,
array(
'ok' => (bool)$conn,
));
if (!$conn) {
throw new Exception(
pht('Unable to connect to LDAP server (%s:%d).', $host, $port));
}
$options = array(
LDAP_OPT_PROTOCOL_VERSION => (int)$this->ldapVersion,
LDAP_OPT_REFERRALS => (int)$this->ldapReferrals,
);
foreach ($options as $name => $value) {
$ok = @ldap_set_option($conn, $name, $value);
if (!$ok) {
$this->raiseConnectionException(
$conn,
pht(
"Unable to set LDAP option '%s' to value '%s'!",
$name,
$value));
}View on GitHub (pinned to 5720a38cfe)
When it happens
Trigger: Thrown at src/applications/auth/adapter/PhutilLDAPAuthAdapter.php:317 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/bc7025e6eb5f950c.
Report an issue: GitHub.