#19192 [Fbk]: Array consists of only one value

From: Date: Fri, 27 Sep 2002 00:52:52 +0000
Subject: #19192 [Fbk]: Array consists of only one value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20512@lists.php.net to get a copy of this message
ID: 19192 Updated by: sniper@php.net Reported By: mario.schmidt@mediavillage.de Status: Feedback Bug Type: COM related Operating System: NT, 2000, XP PHP Version: 4.2.2 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-09-05 15:46:27] kalowsky@php.net I don't remember if anything has been backported to it or not, but any chance you can test against the 4.2.3RC's and see if this still continues. ------------------------------------------------------------------------ [2002-08-30 04:09:59] mario.schmidt@mediavillage.de Following code "should" list all NT-Usergroups of the given machinename or nt-domain. This works with ASP but not PHP :(... Array $objComputer is created but it only consists of one recordset (the first one, the machine itself). But there should be more in it! (Groups, Users, Services) <?php $objComputer = new COM("WinNT://machinename"); echo $objComputer->Name." is a ".$objComputer->Class." and has following NT-Groups:<p>"; $objComputer->filter = array("Group"); foreach($objComputer as $group) { print $group->name."<br>\n"; } echo "Group listing complete."; ?> And here the WORKING Code using ASP: <% Set GroupObj = GetObject("WinNT://machinename") strFilter = Array("Group") BaseObj.Filter= strFilter Response.write "---- Select a Group ----<p>" For Each Member in BaseObj Response.write Member.Name & "<br>" Next %> BTW: "WinNT://" is a VALID COM-Data Provider!!! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19192&edit=1

« previous php.bugs (#20512) next »