php-windows Digest 2 Oct 2005 11:15:58 -0000 Issue 2789

Topics (messages 26387 through 26387):

php5<->com terribly wrong ?
        26387 by: Martin Staiger

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Dear experts,

something must be terribliy wrong with either php5<->com or our 
configuration/code.

We used to control MS-Index-Server via php4 without any problems:
----------------------------------------------------
$q = new com ("ixsso.Query");
$util = new com ("ixsso.util");
$q->query = $QueryText . ' AND  #filename "(*"';
$q->SortBy = "rank[d]";
$q->catalog = "docs";
$q->Columns = "filename, Path, size, characterization, rank";
$q->MaxRecords = 300;
$util->AddScopeToQuery ($q, "/", "deep");
$q->LocaleID = $util->ISOToLocaleID("EN-US");

$rs = $q->CreateRecordSet("nonsequential");

// Loop over result
while (!$rs->EOF)
{
    ........

     $rowcount++;
     $rs->MoveNext();
}
----------------------------------------------------

Since we migrated to php5 we changed the iterator to run with FOREACH which 
causes a fatal error:

foreach($rs as $ResultCounter)
{
   ...

}
--> Fatal error: Uncaught exception 'Exception' with message 'Object of type 
variant did not create an Iterator'
in..
Same thing happens with:
foreach($rs as $ResultCounter => $row)
{
   ...
}
--> Fatal error: Uncaught exception 'Exception' with message 'Object of type 
variant did not create an Iterator'
in..

Also, we tried to use the com-exception try..catch which didn't work either.

What's wrong here???

Environment :
win XP/2003, Apache 2.0.53, php 5.0.5

I'm thankful for any hint!
Marc 

--- End Message ---

Reply via email to