From:             sean at iplus dot plus dot com
Operating system: Windows 2000
PHP version:      5.0.4
PHP Bug Type:     COM related
Bug description:  Cannot instantiate a DOTNET object

Description:
------------
When trying to instantiate a DOTNET object in Version 5.0.4 I get a
'com_exception'. I have Microsoft.NET 1.1 installed.

The bug appears similar to a previous bug:

BUG #29490 'Failed to instantiate .Net object' using PHP.NET docu example
BUG #30461 "Failed to Instantiate .Net Object" error (again)

Bug #29490 was fixed in version 5.0.1.

I tried version 5.0.1, 5.0.2, 5.03 and could not instantiate a DOTNET
object. However the error message was different for different versions. 


Version Error message 
----------------------------------
5.0.4           Failed to instantiate .Net object [CreateInstance] [0x80070057]
The parameter is incorrect
5.0.3           Failed to instantiate .Net object [CreateInstance] [0x80070057]
The parameter is incorrect
5.0.2           Failed to initialize .Net runtime
5.0.1           Failed to initialize .Net runtime


The full results of my tests are shown below.

##################################################################

Tests run on previous PHP versions - all with same reproduce code

##################################################################

##################################################################


PHP VERSION = 5.04

##################################################################


C:\PHP>php-5.0.4-Win32\php.exe -v 
PHP 5.0.4 (cli) (built: Mar 31 2005 02:45:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

C:\PHP>php-5.0.4-Win32\php.exe dotnet-example.php 

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] The parameter is
incorrect.
' in C:\PHP\dotnet-example.php:2
Stack trace:
#0 C:\PHP\dotnet-example.php(2): dotnet->dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in C:\PHP\dotnet-example.php on line 2

##################################################################

PHP VERSION = 5.03

##################################################################

C:\PHP>php-5.0.3-Win32\php.exe -v 
PHP 5.0.3 (cli) (built: Dec 15 2004 08:07:57)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies

C:\PHP>php-5.0.3-Win32\php.exe dotnet-example.php 

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] The parameter is
incorrect.
' in C:\PHP\dotnet-example.php:2
Stack trace:
#0 C:\PHP\dotnet-example.php(2): dotnet->dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in C:\PHP\dotnet-example.php on line 2

##################################################################

PHP VERSION = 5.02

##################################################################

C:\PHP>php-5.0.2-Win32\php.exe -v 
PHP 5.0.2 (cli) (built: Sep 24 2004 01:25:41)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies

C:\PHP>php-5.0.2-Win32\php.exe dotnet-example.php 

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
initialize .Net runtime' in C:\PHP\dotnet-example.php:2
Stack trace:
#0 {main}
  thrown in C:\PHP\dotnet-example.php on line 2

##################################################################

PHP VERSION = 5.01

##################################################################

C:\PHP>php-5.0.1-Win32\php.exe -v 
PHP 5.0.1 (cli) (built: Aug 12 2004 23:30:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.1, Copyright (c) 1998-2004 Zend Technologies


C:\PHP>php-5.0.1-Win32\php.exe dotnet-example.php 

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
initialize .Net runtime' in C:\PHP\dotnet-example.php:2
Stack trace:
#0 {main}
  thrown in C:\PHP\dotnet-example.php on line 2

##################################################################
##################################################################


Reproduce code:
---------------
<?php
$stack = new DOTNET("mscorlib", "System.Collections.Stack"); 
$stack->Push(".Net"); 
$stack->Push("Hello "); 
echo $stack->Pop() . $stack->Pop(); 
?> 


Expected result:
----------------
Hello .Net

Actual result:
--------------
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] The parameter is
incorrect.
in C:\PHP\dotnet-example.php:2
Stack trace:
#0 C:\PHP\dotnet-example.php(2): dotnet->dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in C:\PHP\dotnet-example.php on line 2


-- 
Edit bug report at http://bugs.php.net/?id=33188&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33188&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33188&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33188&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33188&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33188&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33188&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33188&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33188&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33188&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33188&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33188&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33188&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33188&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33188&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33188&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33188&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33188&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33188&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33188&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33188&r=mysqlcfg

Reply via email to