Active Directory on local server and intranet on e

2019-09-15 16:04发布

I have a local Active Directory server and a external web server where my intranet is located.

$ad = ldap_connect("ldap://ip-address") or die("Couldn't connect to AD!");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind( $ad, "user@domain", "password") or die("Can't bind to server.");

When I run this on a local web server it succesfully binds the connection. If I run the same code on the external server its unable to bind the ldap connection. Both port 389 and 636 is open on the AD server.

I've tried google for an answer, but all the tutorials is for Active Directory and webserver on the same server. Is this even possible?

1条回答
混吃等死
2楼-- · 2019-09-15 17:07

Regarding LDAPS, this is often related to an invalid ssl certificate. A workaround for that is described here: LDAP and PHP connection failure

查看更多
登录 后发表回答