Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown Curl error

Tags:

php

curl

I got a small problem getting an unknown curl error from my script

curl_error(): 180 is not a valid cURL handle resource

Here's the part which causes the error and exact log: PHP Warning: curl_error(): 180 is not a valid cURL handle resource on

if(curl_error($ch))  
{  
    curl_close($ch);  
    $resp = curl_error($ch); // That's the line causing the error  
    error_log(date('Y M D h:s:m '). ":  $current error:  "  .curl_error($ch)."\n", 3, '../../usererrors/'.$username.'errors');  
    return $resp;  
}
like image 858
Kaido Avatar asked Mar 24 '10 17:03

Kaido


1 Answers

I must admit that the error was caused by calling curl_close before curl_error. So case closed hope someone got some help from this as well :)

like image 54
Kaido Avatar answered Sep 23 '22 07:09

Kaido