COM issue, different behaviour between cli and browser
| From: | Simon Taylor | Date: | Wed, 13 Apr 2005 11:45:20 +0000 |
| Subject: | COM issue, different behaviour between cli and browser | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25834@lists.php.net to get a copy of this message | ||
Hi All,
I have the following bit of code which works fine in a browser window,
but as soon as I try it in cli mode it fails. I have a lot of other COM
stuff which works just fine, just this one. Any ideas welcome.
$oDso = new COM("WinNT:");
$oComp =
$oDso->OpenDSObject("WinNT://DOMAIN/HOST$,user","administrator","passwor
d",ADS_SECURE_AUTHENTICATION);
echo $oComp->Name;
The failure..
PHP Fatal error: Uncaught exception 'com_exception' with message
'Source: Unknown
Description: Unknown' in c:\apache\corizon\inventory\batch.php:46
Stack trace:
#0 c:\apache\corizon\inventory\batch.php(46):
com->OpenDSObject('WinNT://DOMAIN/...', 'administrator',
'password', 1)
#1 {main}
Using php5 on windows XP and 2003
Many thanks,
Simon