From:             steven dot partridge at l-3com dot com
Operating system: Windows 2003 Server SP1
PHP version:      5CVS-2007-01-24 (snap)
PHP Bug Type:     COM related
Bug description:  COM object issues with ADODB accessing Active Directory

Description:
------------
I have ported code from VBScript to PHP using the ADODB COM object to
access and retrieve information from Active Directory. The code works well
in VBScript, but when I run it via PHP I recieve the following error:

exception 'com_exception' with message 'Source: Provider
Description: Table does not exist.' in
C:\Inetpub\wwwroot\z_ADODB_test.php:41 Stack trace: #0
C:\Inetpub\wwwroot\z_ADODB_test.php(41): unknown() #1 {main}

I can provide the VBScript if necessary

Reproduce code:
---------------
$objConnection = new COM("ADODB.Connection");
$objCommand = new COM("ADODB.Command");
$objConnection->Provider = "ADsDSOOBject";
$objConnection->Open ("Active Directory Provider");
$objCommand->ActiveConnection = $objConnection;

$objRecordset = new COM("ADODB.Recordset");

$strDNSDomain = "DC=IPS,DC=ad,DC=local";
$strFilter =
"(&(objectCategory=person)(objectClass=user)(sAMAccountName=username))";
$strQuery =
"<LDAP://".$strDNSDomain.">;".$strFilter.";sAMAccountName,distinguishedName,mail;subtree";

$objCommand->CommandText = $strQuery;

try{
$objRecordset = $objCommand->Execute;
}
catch (com_exception $e) {
  print "<P><B>Error executing ADODB query</B><BR>".$e . "\n";
}

Expected result:
----------------
No errors recieved.

Actual result:
--------------
exception 'com_exception' with message 'Source: Provider
Description: Table does not exist.' in
C:\Inetpub\wwwroot\z_ADODB_test.php:41 Stack trace: #0
C:\Inetpub\wwwroot\z_ADODB_test.php(41): unknown() #1 {main}

-- 
Edit bug report at http://bugs.php.net/?id=40227&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40227&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40227&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40227&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40227&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40227&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40227&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40227&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40227&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40227&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40227&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40227&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40227&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40227&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40227&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40227&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40227&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40227&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40227&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40227&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40227&r=mysqlcfg

Reply via email to