By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,348 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,348 IT Pros & Developers. It's quick & easy.

PHP with .NET

P: 1
At the moment I use PHP with my own c#-class (which I use via COM-Interface)

[PHP]$modProject = new COM('XMLLibrary.XMLModuleProject')[/PHP]

Now I want to use the class via DOTNET-Methode.

[PHP]$stack = new DOTNET("XMLLibrary, Version=, Culture=neutral, PublicKeyToken=d6d5e7447d7d8086", "XMLModuleProject");[/PHP]

But this doesn't work. I always received the error message:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80070002] Das System kann die angegebene Datei nicht finden.

english: The System can't find the indicated File.
There is also a other question. Does the PHP-Code above work on Linux?

I hope you can help me.

Sep 5 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 5,058

Are you sure the version number is correct? I'm not sure .Net1 will see .Net2 assemblies. (Not sure, never tried this myself).

This won't work under Linux. The COM extension is only available for the Windows version of PHP, and the .Net function requires PHP5 and that the .Net runtime is installed.

Not knowing the Mono project very well (Linux .Net port), I assume that if it were possible to use that, it would be less then a pleasant setup process.
Sep 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.