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

From: Date: Thu, 05 Sep 2002 20:46:27 +0000
Subject: #19192 [Opn->Fbk]: Array consists of only one value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18528@lists.php.net to get a copy of this message
ID: 19192 Updated by: kalowsky@php.net Reported By: mario.schmidt@mediavillage.de -Status: Open +Status: Feedback Bug Type: COM related Operating System: NT, 2000, XP PHP Version: 4.2.2 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 (#18528) next »