1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Curl https problem

Discussion in 'PHP' started by zdvolode, Aug 1, 2006.

  1. #1
    When I'm trying to run a script (that uses curl functions) that connects with username and password to a https:// I get the following error

    "SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"

    to my limited knowledge this problem is caused because curl is not compiled with ssl

    but when I check php status i see that the ssl is enabled

    CURL support enabled
    CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3


    Thank you for your help
     
    zdvolode, Aug 1, 2006 IP
  2. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hmm...
    You can try doing this:
    
    curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
    
    PHP:
     
    coderlinks, Aug 1, 2006 IP
  3. The Blackest Hat

    The Blackest Hat Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was just having the same problem...in addition to the previous line, add:

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
    Code (markup):
     
    The Blackest Hat, Aug 15, 2006 IP
  4. Pezus

    Pezus Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    instead of curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);

    put these two lines
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
    		
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 
    PHP:
    Hope it helps
     
    Pezus, Sep 7, 2008 IP
  5. highway7

    highway7 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for the replies.

    I have tried everything suggested above and still get the same error. Does anybody have any ideas?

    Thanks in advance.
     
    highway7, Feb 12, 2010 IP
  6. jovaniwayne

    jovaniwayne Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6

    Thanks.. this works....
     
    jovaniwayne, Nov 15, 2011 IP