'Failed to instantiate .Net object' using PHP.NET docu example
| Bug #29490 | 'Failed to instantiate .Net object' using PHP.NET docu example | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2004-08-02 13:23 UTC | Modified: | 2004-08-08 21:11 UTC |
|
||||||||||
| From: | mike at ziebeck dot net | Assigned: | ||||||||||||
| Status: | Closed | Package: | COM related | |||||||||||
| PHP Version: | 5.0.0 | OS: | Windows 2000 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2004-08-02 13:23 UTC] mike at ziebeck dot net
Description: ------------ PHP.NET Api is not working. While trying to instantiate .NET object as shown in the PHP.NET documentation example a fatal error occures. Tested Config: Windows 2000 pro + MS.NET RTL 1.1 + PHP 5.0 final XP pro + MS.NET SDK 1.1 + PHP 5.0Rc3 /5.0 final both tested via php CLI using config file php.ini-dist also noticed by: -------------------------------------------------------------- Subject: [PHP] Instantiate .NET Classes in PHP5? From: "Matthias HALDIMANN" <matthias.haldimann(-at-)epfl.ch> Id:<20040430084921.10316.qmail@pb1.pair.com> Date: Fri, 30 Apr 2004 10:49:20 +0200 http://archive.netbsd.se/?list=php-general&a=2004-04&mid=190829 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: -------------- PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object' in st_DotNet.php:2 Stack trace: #0 {main} thrown in tst_DotNet.php on line 2
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2004-08-02 20:56 UTC] mike at ziebeck dot net
[2004-08-02 21:37 UTC] wez@php.net
[2004-08-03 07:50 UTC] mike at ziebeck dot net
[2004-08-03 11:46 UTC] wez@php.net
[2004-08-03 13:44 UTC] mike at ziebeck dot net
little more verbose output using: --------------------------------- PHP 5.1.0-dev (cli) (built: Aug 3 2004 12:19:41) Actual result: -------------- Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [IDispatch_Invoke]' in tst_DotNet.php:2 Stack trace: #0 {main} thrown in tst_DotNet.php on line 2[2004-08-03 14:42 UTC] wez@php.net
[2004-08-03 17:17 UTC] mike at ziebeck dot net
even more verbose output using: ------------------------------- PHP 5.1.0-dev (cli) (built: Aug 3 2004 16:28:21) Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [IDispatch_Invoke] Ausnahmefehler aufgetreten. ' in tst_DotNet.php:2 Stack trace: #0 {main} thrown in tst_DotNet.php on line 2[2004-08-04 09:49 UTC] mike at ziebeck dot net
[2004-08-04 13:44 UTC] wez@php.net
[2004-08-04 13:56 UTC] mike at ziebeck dot net
[2004-08-04 15:03 UTC] wez@php.net
[2004-08-04 18:18 UTC] mike at ziebeck dot net
Software Setup: Windows 2000 pro (german) clean install (Service Pack 4) .NET: MS DotNET FrameWork RTL 1.1 USER: Administrator unpack: php5-win32-200408040230.zip => c:\Programme\php\php5 copy: c:\Programme\php\php5.php.ini-dist c:\Programme\php\php5.php.ini copy: tst_DotNet.php c:\Programme\php\tst_DotNet.php >php -c c:\Programme\php\php5\php.ini -f tst_DotNet.php Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [IDispatch_Invoke] Ausnahmefehler aufgetreten.' in c:\Programme\php\php5\tst_DotNet.php:2 Stack trace: #0 {main} thrown in c:\Programme\php\php5\tst_DotNet.php on line 2 ------------------------------------------------------------ No files (*.ini, *.dll) have been (re)placed in windows system folders. Working directory: c:\Programme\php\php5 ------------------------------------------------------------ Kind Regards mz.[2004-08-04 18:23 UTC] mike at ziebeck dot net
There's been a typo: c:\Programme\php\php5.php.ini is c:\Programme\php\php5.ini Sorry for that. mz.[2004-08-05 08:14 UTC] matthias dot haldimann at epfl dot ch
[2004-08-05 09:25 UTC] mike at ziebeck dot net
[2004-08-07 22:40 UTC] christian at wenz dot org
[2004-08-08 01:03 UTC] wez@php.net
[2004-08-08 21:11 UTC] mike at ziebeck dot net
Well DONE, Michael !! ===================== Works fine now using: php5-win32-200408081430.zip PHP 5.1.0-dev (cli) (built: Aug 8 2004 16:31:06) Zend Engine v2.0.1-dev, Copyright (c) 1998-2004 Zend Technologies >php5 -f tst_DotNet.php Hello .Net Windows XP pro (no sevice packs, no patches) MS .NET SDK 1.1 logged on as 'Hauptbenutzer'==MainUser Best Regards mz.[2004-08-09 08:20 UTC] christian at wenz dot org