2
votes

Sorry, I realise this is an oft-asked question but I've followed all of the standard advice to no avail.

I'm trying to use a php library written by somebody else which provides wrapper functions for curl. I have uncommented extension=php_curl.dll in the php.ini file, saved it and restarted my server (Wampserver). I have also done a phpinfo() in the browser which says that curl is enabled, however I continue to get the error mentioned above.

Here is snippet of the code, with the offending line 249 -

function http($target, $ref, $method, $data_array, $incl_head)
{
# Initialize PHP/CURL handle
$ch = curl_init(); <----

# Prcess data, if presented
if(is_array($data_array))
    {
    # Convert data array into a query string (ie animal=dog&sport=baseball)
    foreach ($data_array as $key => $value)
    etc...

I have triple checked all of the above and even restarted my computer and checked again in desperation - the curl extension is definitely uncommented and phpinfo() definitely shows curl as being enabled.

Hope someone might have an idea what's up?

Thanks, Paul.

2
Hello, welcome to SO. Try to use search before asking question. Read about installation of CURL: php.net/manual/en/curl.setup.php - OZ_
Hello, as I said, phpinfo is telling me that curl is installed and enabled. The curl module also has a tick next to it in Wampserver's list if modules, meaning that it is enabled. I have used the search function, which is how I was able "follow all the standard advice", as mentioned in my original comment. - Paul Philp
Sorry, my bad, I was not mindful enough. - OZ_
No problem :) I really have tried every tip and piece of advice that I can find on here and on Google, but am still getting the same error despite curl apparently being installed and enabled... will have to tinker with it tomorrow, time for bed. - Paul Philp
I have same problem how did you resolve this? - user269867

2 Answers

2
votes

You need to enable php_curl.dll in two locations

  • Open C:wamp\bin\php\php5.2.6\php.ini
  • Find “;extension=php_curl.dll” and remove the semicolon to uncomment the line
  • Do the same for C:wamp\bin\apache\apache2.2.8\bin\php.ini
0
votes

you need to uncomment PHP curl in the php.ini file and make sure the dll is available.