Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading AD / LDAP with PHP class

Status
Not open for further replies.

Ecky

Technical User
Jun 11, 2003
21
0
0
NL
With Exchange 5.5 I could read the LDAP with this class (written in PHP):

if (!$this->_connection)
$this->_connection=$this->ldap($_host,$_port);
ldap_set_option($this->_connection, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_get_option($this->_connection, LDAP_OPT_PROTOCOL_VERSION, $version);
// echo "version:" . $version, "<BR>";
$ctrl1 = array("oid" => "1.2.840.113556.1.4.302", "iscritical" => FALSE);
// iscritical defaults to FALSE
$ctrl2 = array("oid" => "1.2.840.113556.1.4.302");

Recently we migrated to Exchange 2003, and now I get this error:

Warning: ldap_bind(): Unable to bind to server: Invalid credentials in D:\Inetpub\ on line 82
Error Occurred:When: Login failed for dn= cn=INTEGRA\admin, dc=INTEGRA, dc=en
Errorno: 0
Text: Invalid credentials

I checked the credentials and can logon with them. I think it's in the class.
Does anyone have a new class or a new array like "1.2.840.113556.1.4.302" ?

Greetz Alex

Learn the rules, then breake some...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top