Using curl with Phalanger

1k views Asked by At

I'm trying to use the PHP Phalanger curl library php_curl.mng.dll in a .NET application. I set up my App.config as follows:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <phpNet>
    <classLibrary>
      <add assembly="php_curl.mng, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" />
    </classLibrary>
  </phpNet>
</configuration>

and am trying to call curl_init() in C#:

  PHP.Library.Curl.curl_init();

The code compiles with no errors but an exception gets fired when reaching the instruction:

  PHP.Core.PhpException: Call to undefined external function 'curl_init', extension 'php_curl' - check configuration.

Would someone know what I am missing?

Thank you,

Eric.

1

There are 1 answers

0
ericdes On BEST ANSWER

Actually I just found the solution in this thread http://phalanger.codeplex.com/discussions/1345

See the post by ladaprosek and the need to copy App.config to the target directory.