FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » COM and DOTNET on Windows Server 2008 R2 64 bit
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
COM and DOTNET on Windows Server 2008 R2 64 bit [message #174207] Thu, 26 May 2011 21:14 Go to next message
Trevor is currently offline  Trevor
Messages: 11
Registered: February 2011
Karma: 0
Junior Member
On a test server, using Windows Server 2003 R2 with Apache, I am able to
use COM and DOTNET functionality. (Although I actually ended up using
the UniversalCCW library which provides a COM wrapper around any .Net
assembly in order to do what I needed.)

I'm now trying to get this stuff working on our production server, using
Windows Server 2008 R2 64 bit. I'm using these lines of code (which
again, works fine on the other server):

$COM = new COM("Universal_CCW.Universal_CCW_Factory");
$asmb_full_name = "uucrypto, Version=1.0.0.2, Culture=Neutral,
PublicKeyToken=d3356e74613fd6c5";
$crypto = $COM->New_Object("test", $asmb_full_name, "uu.uucrypto");

I get the following error when it gets to the 3rd line above:

1 Fatal error: Uncaught exception 'com_exception' with message 'Source:
mscorlib Description: Could not load file or assembly 'uucrypto,
Version=1.0.0.2, Culture=neutral, PublicKeyToken=d3356e74613fd6c5' or
one of its dependencies. The system cannot find the file specified.' in
test.php:21 Stack trace: #0 test.php(21): com->New_Object('test',
'uucrypto, Versi...', 'uu.uucrypto') #1 {main} thrown in test.php on line 21

The same assembly works fine on the same server from a simple test
program I made in C#.

I've tried everything I can find to try. I even just tried the DOTNET
function to see if it would work, but that also didn't work. I got the
following error:

1 Fatal error: Class 'DOTNET' not found in test.php on line 16

Is there something I need to do to turn this stuff on??

Thanks,
Trevor
Re: COM and DOTNET on Windows Server 2008 R2 64 bit [message #174208 is a reply to message #174207] Thu, 26 May 2011 22:26 Go to previous messageGo to next message
Trevor is currently offline  Trevor
Messages: 11
Registered: February 2011
Karma: 0
Junior Member
I just tried running php from the commandline, and my assembly works
fine - using the same php script that doesn't work in my browser. I'm
starting to think it might be some kind of security problem?

- Trevor

On 5/26/2011 3:14 PM, Trevor wrote:
> On a test server, using Windows Server 2003 R2 with Apache, I am able to
> use COM and DOTNET functionality. (Although I actually ended up using
> the UniversalCCW library which provides a COM wrapper around any .Net
> assembly in order to do what I needed.)
>
> I'm now trying to get this stuff working on our production server, using
> Windows Server 2008 R2 64 bit. I'm using these lines of code (which
> again, works fine on the other server):
>
> $COM = new COM("Universal_CCW.Universal_CCW_Factory");
> $asmb_full_name = "uucrypto, Version=1.0.0.2, Culture=Neutral,
> PublicKeyToken=d3356e74613fd6c5";
> $crypto = $COM->New_Object("test", $asmb_full_name, "uu.uucrypto");
>
> I get the following error when it gets to the 3rd line above:
>
> 1 Fatal error: Uncaught exception 'com_exception' with message 'Source:
> mscorlib Description: Could not load file or assembly 'uucrypto,
> Version=1.0.0.2, Culture=neutral, PublicKeyToken=d3356e74613fd6c5' or
> one of its dependencies. The system cannot find the file specified.' in
> test.php:21 Stack trace: #0 test.php(21): com->New_Object('test',
> 'uucrypto, Versi...', 'uu.uucrypto') #1 {main} thrown in test.php on
> line 21
>
> The same assembly works fine on the same server from a simple test
> program I made in C#.
>
> I've tried everything I can find to try. I even just tried the DOTNET
> function to see if it would work, but that also didn't work. I got the
> following error:
>
> 1 Fatal error: Class 'DOTNET' not found in test.php on line 16
>
> Is there something I need to do to turn this stuff on??
>
> Thanks,
> Trevor
Re: COM and DOTNET on Windows Server 2008 R2 64 bit [message #174209 is a reply to message #174208] Thu, 26 May 2011 22:52 Go to previous message
Trevor is currently offline  Trevor
Messages: 11
Registered: February 2011
Karma: 0
Junior Member
Huh. Restarting Apache fixed it. Now I have no idea which thing it was
that I did that made it work.

- Trevor

On 5/26/2011 4:26 PM, Trevor wrote:
> I just tried running php from the commandline, and my assembly works
> fine - using the same php script that doesn't work in my browser. I'm
> starting to think it might be some kind of security problem?
>
> - Trevor
>
> On 5/26/2011 3:14 PM, Trevor wrote:
>> On a test server, using Windows Server 2003 R2 with Apache, I am able to
>> use COM and DOTNET functionality. (Although I actually ended up using
>> the UniversalCCW library which provides a COM wrapper around any .Net
>> assembly in order to do what I needed.)
>>
>> I'm now trying to get this stuff working on our production server, using
>> Windows Server 2008 R2 64 bit. I'm using these lines of code (which
>> again, works fine on the other server):
>>
>> $COM = new COM("Universal_CCW.Universal_CCW_Factory");
>> $asmb_full_name = "uucrypto, Version=1.0.0.2, Culture=Neutral,
>> PublicKeyToken=d3356e74613fd6c5";
>> $crypto = $COM->New_Object("test", $asmb_full_name, "uu.uucrypto");
>>
>> I get the following error when it gets to the 3rd line above:
>>
>> 1 Fatal error: Uncaught exception 'com_exception' with message 'Source:
>> mscorlib Description: Could not load file or assembly 'uucrypto,
>> Version=1.0.0.2, Culture=neutral, PublicKeyToken=d3356e74613fd6c5' or
>> one of its dependencies. The system cannot find the file specified.' in
>> test.php:21 Stack trace: #0 test.php(21): com->New_Object('test',
>> 'uucrypto, Versi...', 'uu.uucrypto') #1 {main} thrown in test.php on
>> line 21
>>
>> The same assembly works fine on the same server from a simple test
>> program I made in C#.
>>
>> I've tried everything I can find to try. I even just tried the DOTNET
>> function to see if it would work, but that also didn't work. I got the
>> following error:
>>
>> 1 Fatal error: Class 'DOTNET' not found in test.php on line 16
>>
>> Is there something I need to do to turn this stuff on??
>>
>> Thanks,
>> Trevor
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: furniture
Next Topic: for intelligent people
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 11:45:35 GMT 2024

Total time taken to generate the page: 0.02305 seconds