From: Operating system: Windows XP PHP version: 5.3.1 Package: COM related Bug Type: Bug Bug description:PHP4 works, PHP5 says "this variant has no properties"
Description: ------------ Test script works, as expected, under PHP4. Gives nonsensical error under PHP5. Test script: --------------- <?php $registry = new COM('winmgmts:root/DEFAULT:StdRegProv'); $values = new VARIANT(); echo $registry->getBinaryValue(0x80000002, 'SOFTWARE\\Microsoft\\Cryptography\\RNG', 'Seed', $values); var_dump($values->value); ?> Expected result: ---------------- >From PHP4: array(80) { [0]=> int(105) [1]=> int(144) [2]=> int(158) [3]=> int(99) [4]=> int(155) [5]=> int(55) [6]=> int(130) [7]=> int(185) [8]=> int(210) [9]=> int(60) [10]=> int(182) [11]=> int(200) [12]=> int(170) [13]=> int(52) [14]=> int(34) [15]=> int(86) [16]=> int(17) [17]=> int(147) [18]=> int(100) [19]=> int(212) [20]=> int(205) [21]=> int(146) [22]=> int(243) [23]=> int(102) [24]=> int(17) [25]=> int(159) [26]=> int(193) [27]=> int(252) [28]=> int(189) [29]=> int(83) [30]=> int(143) [31]=> int(51) [32]=> int(183) [33]=> int(3) [34]=> int(48) [35]=> int(46) [36]=> int(102) [37]=> int(73) [38]=> int(210) [39]=> int(237) [40]=> int(13) [41]=> int(244) [42]=> int(194) [43]=> int(117) [44]=> int(254) [45]=> int(234) [46]=> int(166) [47]=> int(147) [48]=> int(104) [49]=> int(192) [50]=> int(211) [51]=> int(117) [52]=> int(50) [53]=> int(148) [54]=> int(253) [55]=> int(148) [56]=> int(237) [57]=> int(85) [58]=> int(70) [59]=> int(242) [60]=> int(32) [61]=> int(159) [62]=> int(38) [63]=> int(182) [64]=> int(211) [65]=> int(36) [66]=> int(205) [67]=> int(115) [68]=> int(212) [69]=> int(117) [70]=> int(40) [71]=> int(249) [72]=> int(102) [73]=> int(67) [74]=> int(100) [75]=> int(147) [76]=> int(236) [77]=> int(194) [78]=> int(241) [79]=> int(28) } Actual result: -------------- >From PHP5: Fatal error: Uncaught exception 'com_exception' with message 'this variant has no properties' in C:\php\test.php:5 Stack trace: #0 C:\php\test.php(5): unknown() #1 {main} thrown in C:\php\test.php on line 5 -- Edit bug report at http://bugs.php.net/bug.php?id=51206&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51206&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51206&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51206&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51206&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51206&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51206&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51206&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51206&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51206&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51206&r=support Expected behavior: http://bugs.php.net/fix.php?id=51206&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51206&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51206&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51206&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51206&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51206&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51206&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51206&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51206&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51206&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51206&r=mysqlcfg