Jump to content

Archived

This topic is now archived and is closed to further replies.

tomfmason

Call to undefined function: curl_init().

Recommended Posts

I am running php 5.0.5 on windows XP. I have uncommented the php_curl.dll.

The manual is rather vague on the setup of curl. I read somewhere that I had to add the libeay.dll and the ssleay.dll to the system32 directory. I tried that and I am still getting the error

[quote author=error message]
Call to undefined function: curl_init().
[/quote]


Then I tried [code=php:0]dl("php_curl.dll");[/code] and I got the following error

[quote author=error message]

Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use extension=php_curl.dll in your php.ini

[/quote]


Here is my simple script

[code]
<?php
dl("php_curl.dll");// this I just recently added
$url = "http://www.whois.net/whois.cgi2";
$domain = $_GET['domain'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "?d=$domain");
$result = curl_exec($ch);
echo $result;
?>[/code]

Any suggestions as to how I can get the curl working correctly would be greatly appreciated.

Thanks,
Tom

Share this post


Link to post
Share on other sites
I replaced [code=php:0]dl('php_curl.dll');[/code] with [code=php:0]ini_set('extension', 'php_curl.dll');[/code]

And I still get the call to undefined function error.

I guess that I need to stop trying to work around the issue and try to fix it all together. Does anyone know of any links or maybe a suggestion on what exactly I need to do to get curl working properly.

Let me go back over what I have done so far.


I have uncommented the php_curl.dll in the php.ini and thought that I should add the libeay32.dll and ssleay32.dll to the system32 directory.

This has done nothing.

Any suggestions?

Share this post


Link to post
Share on other sites
@simple5imon please stop replying to my posts when you want some help. You can contact me via email.

Now back to my issue..lol.. This one should be in the record books for the dumbest thing ever done.. I edited a backup copy of my php.ini instead of the real one. That is why I was having all of the problems.

I spent about 3 hours trying to figure out what I was doing wrong

Thanks,
Tom

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.