ID: 25759 User updated by: david dot nicholls at camden dot gov dot uk Reported By: david dot nicholls at camden dot gov dot uk -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows 2000 PHP Version: 5CVS-2003-10-06 (dev) New Comment:
Its one of the usefule errors :) C:\Inetpub\wwwroot\ntadmin>php comtest.php Content-type: text/html X-Powered-By: PHP/5.0.0b2-dev Making COM connection using ADSI WinNT://Camden Boundexception Object ( [message:protected] => Unknown exception [string:private] => [code:protected] => 0 [file:protected] => C:\Inetpub\wwwroot\ntadmin\comtest.php [line:protected] => 12 [trace:private] => Array ( ) [message] => <b>Source:</b> Active Directory<br/><b>Description:</b> Unspecified error [file] => C:\Inetpub\wwwroot\ntadmin\comtest.php [line] => 12 ) C:\Inetpub\wwwroot\ntadmin> Line 12 is the 'while' line Previous Comments: ------------------------------------------------------------------------ [2003-10-07 08:45:46] [EMAIL PROTECTED] Put the try { } catch () stuff around the whole of your script and lets see what's going wrong. (Yes, PHP should at least tell you about the uncaught exception; that appears to be another bug) ------------------------------------------------------------------------ [2003-10-07 07:42:00] david dot nicholls at camden dot gov dot uk Should add fails silently after echoing 'Bound' to console ------------------------------------------------------------------------ [2003-10-07 07:40:27] david dot nicholls at camden dot gov dot uk The bug fix worked thanks and I can now do the instatitaion. However there are issues at the next stage :( This works under 4 and not 5 I suspect "while($obj = $comUsers->Next())" (dont know how to put in the exception handling code there) <?php $acctDomain = "Camden"; echo "Making COM connection using ADSI\n\r"; $acctStr = "WinNT://".$acctDomain; echo "$acctStr\n\r"; $comUsers = new COM($acctStr); echo "Bound"; while($obj = $comUsers->Next()) { $uClass = $obj->Class; $uName = $obj->Name; echo "$uName \t $uClass \n\r"; } ?> ------------------------------------------------------------------------ [2003-10-06 11:09:13] [EMAIL PROTECTED] I've comitted a quick little "fix" for this; you can pick it up in the next development snapshot in around 3 hours time. Please let me know if it works for you. ------------------------------------------------------------------------ [2003-10-06 09:59:14] david dot nicholls at camden dot gov dot uk Looks like PHP is messing up valid syntax exception Object ( [message:protected] => Unknown exception [string:private] => [code:protected] => 0 [file:protected] => C:\Inetpub\wwwroot\ntadmin\comtest.php [line:protected] => 15 [trace:private] => Array ( ) [message] => Failed to create COM object `WinNT://Camden': Invalid syntax [file] => C:\Inetpub\wwwroot\ntadmin\comtest.php [line] => 15 ) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25759 -- Edit this bug report at http://bugs.php.net/?id=25759&edit=1