Jump to content


Photo

Call to undefined function: curl_init().


  • Please log in to reply
3 replies to this topic

#1 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 03 September 2006 - 03:48 PM

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

Call to undefined function: curl_init().



Then I tried
dl("php_curl.dll");
and I got the following error


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



Here is my simple script

<?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;
?>

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

Thanks,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 03 September 2006 - 05:10 PM

I replaced
dl('php_curl.dll');
with
ini_set('extension', 'php_curl.dll');

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?

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#3 simple5imon

simple5imon
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 03 September 2006 - 05:17 PM

TOMMY!  :'( you not on msn! im there now! please come  ;)

#4 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 03 September 2006 - 05:44 PM

@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

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users