tags:

views:

100

answers:

1

Hi,

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.

A: 

Actually I just found the solution in this thread http://phalanger.codeplex.com/Thread/View.aspx?ThreadId=1345&amp;ANCHOR

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

ericdes