ID: 15655 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: COM related Operating System: WinNT SP6 PHP Version: 4.1.1 New Comment:
you shouldn't have to encapsulate the $recordset instance into a VARIANT() object as this is done by the com layer implicitely. the VARIANT() class is only necessary if you want multiple indirections (e.g. you want to pass a pointer to the instance instead of the instance itself). so passing $recordset to $object2 should be enough. harald ps: if you still have troubles please also test it with the cgi version to check if it is apache related or a general com issue. Previous Comments: ------------------------------------------------------------------------ [2002-02-21 04:46:01] [EMAIL PROTECTED] I have 2 COM objects and I want to pass 1 of them to another by reference. Apache 1.3.23 <? //first object is ADODB.recordset $recordset= new COM("ADODB.Recordset") or die("recodset down"); //I want this object to be passed by reference so i declare Variant type $rs=new Variant($recordset); //below lines are unimportant because I got Internal Server ERROR here $object2= new COM("object.object") or die ("object down"); $object2->ddw("sterfind",$rs); ?> when I declare $rs = new Variant() or $rs= new Variant(VT_DISPATCH) then script works but object2 reports type mismatch error_log raports: Premature end of script headers: c:/php/php.exe ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15655&edit=1