php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16919 Can only run one Com Object per PHP page.
Submitted: 2002-04-29 18:41 UTC Modified: 2002-07-20 21:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: shelley at databyte dot com Assigned: phanto (profile)
Status: Closed Package: COM related
PHP Version: 4.1.2 OS: windows 2000 Server
Private report: No CVE-ID: None
 [2002-04-29 18:41 UTC] shelley at databyte dot com
if you run the following script you will see that only one of the Com objects will run at a time. if you try to run both you will recieve a lookup error on the second invoke on method(method2) if you switch them both $z first you will get it on the method1. which every Com has been created first the other will produce the error message. If you run one at a time everything is fine.  

If you Contact me I will send you the dll to run with this PHP page. Since I can't attach it.


You will need the dll to run with this sample. You should recieve an Look up error on $nfoo=com_invoke($z,"method2",$age,$grade);

<html>
<head>
<meta name="GENERATOR" content="Workorder Databyte">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http_equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<?
$myname='shelley';
$country='canada';
$age='99';
$grade='23';
$a = new COM("tstproj.myclass1") or die ("Com Class not found");
$z = new COM("tstproj.myclass2") or die ("Com Class not found");
$foo=com_invoke($a,"method1",$myname,$country);
// calling second Com method
$nfoo=com_invoke($z,"method2",$age,$grade);
?>
</body>
</html>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-03 19:46 UTC] phanto@php.net
please send the dll to harald.radi@nme.at .
 [2002-07-20 21:59 UTC] phanto@php.net
this should be fixed in the new COM extension which eventually will be bundled in the next ZendEngine2 snapshot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC