Marshalled for a different thread
| From: | gus | Date: | Wed, 05 Apr 2000 14:47:37 +0000 |
| Subject: | Marshalled for a different thread | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13168@lists.php.net to get a copy of this message | ||
Hi!
I'm using PHP4 RC1 as a CGI on NT4 and IIS4.
After frequently calling a PHP script using COM to access MS Index
Server (see below) I receive the following error:
"Warning: Invoke() failed: Exception occured. in E:\foo.php on line
16"
where the CreateRecordset method of the Query object is called. When
calling an ASP script with identical functionality (see below too) to
access the same COM object this error message is displayed:
CreateRecordset-Error '8001010e'
The application called an interface that was marshalled for a
different thread.
Frequently calling the ASP script will not result in this error.
Is there something wrong with my PHP code or could it be a bug?
Guido
------- snip ------- snip ------- snip ------- snip -------
PHP script:
<html><head></head>
<body>
<h1>Index-Server Test for PHP4</h1>
<table border=1>
<?php
$q = new COM("ixsso.Query");
$q->Query = "@contents attorney";
$q->Catalog = "archive";
$q->SortBy = "rank[d]";
$q->Columns = "characterization, path, write, DocKeywords";
$q->MaxRecords = 200;
$rs = $q->CreateRecordSet("nonsequential");
$rs->PageSize = 10;
if (!$rs->EOF) {
$c = 0;
while (!($rs->EOF) && ($c<$rs->PageSize)) {
echo "<tr>";
for ($i=0; $i<$rs->Fields->Count; $i++) {
$fld = $rs->Fields($i);
echo "<td>".$fld->Value."</td>";
}
echo "</tr>\n";
$rs->MoveNext();
$c++;
}
$rs->Close();
} else {
echo "EOF";
}
?>
</table>
</body>
</html>
------- snip ------- snip ------- snip ------- snip -------
ASP script:
<%@LANGUAGE=JScript%>
<html><head></head>
<body>
<h1>Index-Server Test for ASP</h1>
<table border=1>
<%
var q = new ActiveXObject("ixsso.Query");
q.Query = "@contents attorney";
q.Catalog = "archive";
q.SortBy = "rank[d]";
q.Columns = "characterization, path, write, DocKeywords";
q.MaxRecords = 200;
rs = q.CreateRecordSet("nonsequential");
rs.PageSize = 10;
if (!rs.EOF) {
c = 0;
while (!(rs.EOF) && (c<rs.PageSize)) {
Response.Write("<tr>");
for (var i=0; i<rs.Fields.Count; i++) {
Response.Write("<td>"+rs.Fields(i).Value+"</td>");
}
Response.Write("</tr>\n");
rs.MoveNext();
c++;
}
rs.Close();
} else {
Response.Write("EOF");
}
%>
</table>
</body>
</html>