PHP with .NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobWU
    New Member
    • Sep 2008
    • 1

    PHP with .NET

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

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

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

    [PHP]$stack = new DOTNET("XMLLibr ary, Version=1.0.0.0 , Culture=neutral , PublicKeyToken= d6d5e7447d7d808 6", "XMLModuleProje ct");[/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.

    Thanks
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    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.

    Comment

    Working...