PHP, ADO and Active Directory

wxdqz

New Member
Hi All,

I had problems using LDAP functions in PHP to get information from the ADSI
Was checking the PHP ADO options for this.

The following is the code I have used:

$dbc = new COM("ADODB.Connection");
if (!$dbc)
echo ("ADO conn failure");
$dbc->Open("Provider=ADsDSOObject");
$ADsPath = "LDAP://SERVERIP:389/DC=test,DC=soft,DC=com";
$rs =$dbc->Execute("<$ADsPath>;(objectClass=User);Name;SubTree");

The same code works with Perl and returns me the list of users.

In PHP, it doesnt return me any users. Is it something to do with the provider.

Please help ASAP.

Thanks in advance,
Suman
 
Back
Top