#33108 [NEW]: COM two dimensional variant problem
| From: | php at it-solutions dot org | Date: | Mon, 23 May 2005 09:43:51 +0000 |
| Subject: | #33108 [NEW]: COM two dimensional variant problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-79368@lists.php.net to get a copy of this message | ||
From: php at it-solutions dot org
Operating system: WINDOWS XP
PHP version: 5.0.3
PHP Bug Type: COM related
Bug description: COM two dimensional variant problem
Description:
------------
Basically - when I try to derefference a two dimensional array returned
from a COM object PHP bombs with a CGI Error:
CGI / FastCGI has encountered a problem and needs to close. We are sorry
for the inconvenience.
and
CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:
The call works fine in VB so I know th 2-D array is ok.(Or at least ok for
VB)
I know this action wasn't available in 4 - but I thought I could do it in
5.
the code bellow shows how the problem can be created
I have some additional info - but will wait for this to be requested (you
may already know that this function doesn't work)
Reproduce code:
---------------
$DataClass = new COM("SOME.DATA.ACCESS.COM.CLASS");
$SQLRes = new VARIANT(); // Variable to store result
//$SQLRes = array();
$Complete = new VARIANT("False"); // Variable to store returned bool
// some SQL Statement that DOES return data
$GetUserSQL = new VARIANT("SELECT X from Y WHERE Z = 'A'");
//Execute the COM function and get some data back in $SQLRes
$Complete = $DataClass->ExecuteSQL($GetUserSQL,$SQLRes,0);
//Try to output the value of the first (or second) index of the array (I
did try this with index 0 too...)
print $SQLRes[1][1];
Expected result:
----------------
Exepcted output would be the value in the array
Actual result:
--------------
CGI Error.
--
Edit bug report at http://bugs.php.net/?id=33108&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33108&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33108&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33108&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33108&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33108&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33108&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33108&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33108&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33108&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33108&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33108&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33108&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33108&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33108&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33108&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33108&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33108&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33108&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33108&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33108&r=mysqlcfg