CURL - https - solaris

Posted by Vincent on Stack Overflow See other posts from Stack Overflow or by Vincent
Published on 2010-03-23T18:36:45Z Indexed on 2010/04/19 16:53 UTC
Read the original article Hit count: 487

Filed under:
|
|

All,

I am receiving the following error when I use PHP to curl to a https site. Both PHP and the https site are hosted on Solaris. This error seems to occur occassionally but frequently.

error:80089077:lib(128):func(137):reason(119)

This is the curl code I am using:

 $ch = curl_init();
    $devnull = fopen('/tmp/cookie.txt', 'w');

    curl_setopt($ch, CURLOPT_STDERR, $devnull);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_URL, $desturl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,800);
    curl_setopt($ch, CURLOPT_AUTOREFERER, true);
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);

    $retVal = curl_exec($ch);
    print_r(curl_error($ch));

    curl_close($ch);

    if ($devnull)
    {
        fclose($devnull);
    }

How can I fix this error? If not, is there an alternative to curl?

© Stack Overflow or respective owner

Related posts about https

Related posts about curl