#25759 [Opn->Fbk]: COM Instantiation causes Script to fail silently
| From: | wez@php.net | Date: | Mon, 06 Oct 2003 15:09:14 +0000 |
| Subject: | #25759 [Opn->Fbk]: COM Instantiation causes Script to fail silently | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48585@lists.php.net to get a copy of this message | ||
ID: 25759
Updated by: wez@php.net
Reported By: david dot nicholls at camden dot gov dot uk
-Status: Open
+Status: Feedback
Bug Type: COM related
Operating System: Windows 2000
PHP Version: 5CVS-2003-10-06 (dev)
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
)
------------------------------------------------------------------------
[2003-10-06 09:43:30] wez@php.net
Try it with exception handlers:
try {
$comUsers = new COM($acctStr);
}
catch (exception $e) {
print_r($e);
}
------------------------------------------------------------------------
[2003-10-06 09:26:02] david dot nicholls at camden dot gov dot uk
Description:
------------
Following on from bug 25732 I am trying PHP5-dev from CVS
Code that worked previously under 4.3.3 now fails silently
error_reporting = E_ALL is set
Reproduce code:
---------------
$acctDomain = "Camden";
echo "Making COM connection using ADSI\n\r";
$acctStr = "WinNT://".$acctDomain;
echo "$acctStr\n\r";
$comUsers = new COM($acctStr);
echo "new COM Sucessful";
Expected result:
----------------
'new COM Sucessful' to be printed at console or an error code
Actual result:
--------------
Nothing, just brings back command promt
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
C:\Inetpub\wwwroot\ntadmin>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25759&edit=1