|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-06-10 23:19 UTC] andy at advancethermal dot com
Description:
------------
COM handling in php5-win32-200406101030 is failing where it works without error in 4.3.7. For CrystalRunTime.Application, it is crashing with the following commands:
$creport->DiscardSavedData; (in example below)
$creport->ReadRecords();
$creport->Export(false);
Reproduce code:
---------------
$crapp = new COM("CrystalRunTime.Application");
$creport = $crapp->OpenReport("c:\\myweb\\reports\\myreport.rpt", 1);
$creport->DiscardSavedData;
Expected result:
----------------
(no failure expected)
Actual result:
--------------
Fatal error: Uncaught exception 'com_exception' with message 'Error Member not found. ' in C:\myweb\htdocs\printlib.php:3 Stack trace: #0 C:\myweb\htdocs\faxcoverpage.php(26): PrintReport('myreport.rpt', '0', 'myreport', '', 'printmyreport.ph...', 'portrait', '1', Array) #1 {main} thrown in C:\myweb\htdocs\printlib.php on line 3
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
I have also had this issue. Win2K Server Apache 2.0.49 PHP 5.0.0 RC3 $oMapDoc = new COM("Autodesk.MapWindowFile") or die("Unable to instantiate a MapWindowFile object"); ($bDATValidate) ? $oMapDoc->ValidateMwx = true : $oMapDoc->ValidateMwx = false; ($bDATCompress) ? $oMapDoc->CompressMlf = true : $oMapDoc->CompressMlf = false; $oMapDoc->ReadFromMwx($sMWXFilenam); ($sPermMWFFilenam = tempnam( $sOutputdir, "mlf_" )) ? true : die("Unable to generate an output file name"); unlink($sPermMWFFilenam); //It drops the temp file in place whether you use it or not.... $sPermMWFFilenam = str_replace(".tmp", ".mlf", $sPermMWFFilenam); //print($sPermMWFFilenam . " & " . $sGroupname . " & " . $sLayername); $oMapDoc->WriteToMlf($sPermMWFFilenam, $sGroupname, $sLayername); // <------This is the line that fails.... I'm not "me tooing" (I hope). The COM object in question is the Autodesk MapGuide Dynamic Authoring Toolkit. The call to instantiate, set a couple of properties and read a file work fine, but the call to create a new file (the WriteToMlf() call) fails with com_exception, source: unknown description: unknown. Catching the exception yeilds zero usable information. I tried casting the input values as VT_BSTR, VT_UNKNOWN and VT_VARIANT, but nothing worked. It should be noted that there is a similar method called WriteToMwf() that takes a single argument, and it works fine. While I'm at it, there's a method called WriteToMwfStream() that returns a binary array, but I can't get to it. Let me know and I'll see if I can dig up the idf for this thing. Brantley