Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a .NET developer and usually I wrote apps/services that can run under Linux using Mono.
Today I started using DOTNET php function and I was able to use it on Windows/Apache:

    $csclass = new DOTNET("CSharpCOM, Version=, Culture=neutral, ".
    echo $csclass->Base64("Io mi chiamo Marco Giacinti"),"\n";
    echo $csclass->Random2(10,20),"\n";
    echo $csclass->Random1(5),"\n";
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";

where CSharpCOM.CSharpCOMClass is a DLL developed with Framework 3.5 and installed in GAC using gacutil -i path\CSharpCOMClass.dll.
When I save this script as dotnet.php and navigate to http://localhost/dotnet.php Apache respond with

HTTP 500 internal error

Is there any way to use DOTNET php function on Ubuntu?

share|improve this question

The documentation for DOTNET() are in the "Windows Only Extensions" section. I'm guessing that the other PHP binaries don't even have this function compiled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.