|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
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 2even 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 2Software 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.There's been a typo: c:\Programme\php\php5.php.ini is c:\Programme\php\php5.ini Sorry for that. mz.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.