Bug #46224 [Fbk->NoF]: Cannot instantiate .Net object (ABCpdf 6.1 .Net)
| From: | php-bugs at lists dot php dot net | Date: | Sun, 15 Aug 2021 04:22:07 +0000 |
| Subject: | Bug #46224 [Fbk->NoF]: Cannot instantiate .Net object (ABCpdf 6.1 .Net) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235826@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=46224&edit=1
ID: 46224
Updated by: php-bugs@lists.php.net
Reported by: mark at koalit dot dk
Summary: Cannot instantiate .Net object (ABCpdf 6.1 .Net)
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: COM related
Operating System: Vista Business SP1 (da)
PHP Version: 5.2.6
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-08-05 12:22:35] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]? Note that as of PHP 8.0.0, you can (and likely have)
to set com.dotnet_version[2] for this to work. Prior to PHP 8.0.0,
you may be out of luck, and need to workaround.
[1] <https://www.php.net/supported-versions.php>
[2] <https://www.php.net/manual/en/com.configuration.php#ini.com.dotnet-version>
------------------------------------------------------------------------
[2009-07-08 12:09:04] p dot stankowski at transcomp dot pl
Just had to replace:
"TestLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c42df41937303b82'"
with:
"TestLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c42df41937303b82"
Sorry for spam, one sign "'" caused this error. Now the result is "Test
passed".
------------------------------------------------------------------------
[2009-07-08 11:53:20] p dot stankowski at transcomp dot pl
.Net framework 3.5 installed. PHP version 2.3.0.
I have created class library in C# called TestLibrary.dll.
It has only one class:
namespace TestLibrary
{
public class Test
{
public string GetString() { return "Test passed"; }
}
}
Then signed it and added it to GAC. In C:\Windows\assembly I have found all values needed:
Version: 1.0.0.0
Culture: Neutral
Public Key Token: c42df41937303b82
Script:
<?php
$test = new DOTNET("TestLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=c42df41937303b82'", "TestLibrary.Test");
print($test->GetString());
?>
Expected result:
Test passed
Actual result:
PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80131047] ' in
C:\home\Projects\hi_1289_IT-ZEB-SERVER\trunk\src\PHPWithNETTest\index.php:10
Stack trace:
#0 C:\home\Projects\hi_1289_IT-ZEB-SERVER\trunk\src\PHPWithNETTest\index.php(10):
dotnet->dotnet('TestLibrary, Ve...', 'TestLibrary.Tes...')
#1 {main}
thrown in C:\home\Projects\hi_1289_IT-ZEB-SERVER\trunk\src\PHPWithNETTest\index.php on line 10
------------------------------------------------------------------------
[2008-10-24 10:39:56] bjori@php.net
reclassified.
------------------------------------------------------------------------
[2008-10-03 13:08:31] mark at koalit dot dk
Forgot to include PHP version (5.2.6)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=46224
--
Edit this bug report at https://bugs.php.net/bug.php?id=46224&edit=1