#31586 [NEW]: Can't enumerate group membership with ADSI
| From: | ash at theleys dot cambs dot sch dot uk | Date: | Mon, 17 Jan 2005 20:05:33 +0000 |
| Subject: | #31586 [NEW]: Can't enumerate group membership with ADSI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-72320@lists.php.net to get a copy of this message | ||
From: ash at theleys dot cambs dot sch dot uk
Operating system: Win2k or 2k3/IIS5 or 6
PHP version: 5.0.3
PHP Bug Type: COM related
Bug description: Can't enumerate group membership with ADSI
Description:
------------
Can't iterate through list of NT Group memberships.
Same code (as VBScript) works in asp page (lists group names.)
Reproduce code:
---------------
try {
$objUser = new COM("WinNT://myDomain/aUserAccountName");
foreach ($objUser->Groups as $grp) {
echo $grp->Name;
}
$objUser = null;
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
Expected result:
----------------
List of groups that the account is a member of.
Actual result:
--------------
Caught exception: Error Member not found.
But ->Groups _is_ the collection of groups...
(Have looked at Bug #25759 COM Instantiation causes Script to fail
silently)
--
Edit bug report at http://bugs.php.net/?id=31586&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31586&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31586&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31586&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31586&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31586&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31586&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31586&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31586&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31586&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31586&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31586&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31586&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31586&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31586&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31586&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31586&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31586&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31586&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31586&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31586&r=mysqlcfg