Page 1 of 1

Call to undefined function: 'curl_init'

PostPosted: May 22nd, 2013, 9:07 am
by Kamb!z
Hello guys;

I have problem with 'curl_init' in Phalanger Compiler on my VISUAL STUDIO 2012;
So i enable extension=php_curl.dll in my php.ini for vs compiler. but after run or execute show for me this error :

PhpException was unhandled by user code ~> Call to undefined function: 'curl_init'

how i can solve this error ? :) please say me step by step !

and a important problem... this is do you PHP Compiler in VS can't run some functions ? for example i can't run function mail(...);

Thank you.

Re: Call to undefined function: 'curl_init'

PostPosted: May 22nd, 2013, 12:34 pm
by Jakub Misek
Hi,

Phalanger and PHP are two completely different programs. So php.ini is actually not important.

Phalanger is .NET application, configured in .NET .config files. curl_* functions and defined in PhpNetCurl.dll. mail in PhpNetClasslibrary.dll.

So ensure in your app.config (desktop app) or web.config (asp.net app) is following:
Code: Select all
<phpNet><classLibrary>
...
<add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl" />
<add assembly="PhpNetCurl, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" section="curl" />


In Visual Studio, you can also just add references to these files.

Thanks,