Support » Plugin: Twitter Widget Pro » https:// Errors

  • Resolved Dduckster


    Hi there, I have just updated to 2.5.0 but noticed that twitter now requires https:// connections.
    I used to have to select http:// in the previous version options as https:// would not display any tweets.

    I have set the Consumer Key / Secret and entered my domain in Twitters Callback URL. I am currently getting:
    Fatal error: Cannot use object of type WP_Error as array in [path]\wp-content\plugins\twitter-widget-pro\lib\wp-twitter.php on line 121

    When I print_r($resp) before line 121 I get:

    WP_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ) ) [error_data] => Array ( ) ) 1

    Any help is much appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aaron D. Campbell


    Unfortunately the new API requires https be used for many of the requests, rendering it useless via plain http.

    While the plugin can’t function without https, we could try it without verifying the SSL certificat and see if that helps. Try downloading the latest development version from github:

    If that works, then the problem is likely that your server has out of date CA authorities. Where are you hosted?

    Thanks for your time Aaron.

    I’ve tried the master version you linked but all that one seems to do is refresh the page each time i click “Authorise new Account”.

    I’m hosted on my own Windows VPS so I’ll look into CA authorities.

    Cheers for the help!

    I’ve found a workaround. In [website]/wp-includes/class-http.php I changed the line:
    curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
    curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );

    Not sure how secure this is though will have to have a read around.

    Scrap that workaround I found a permanent fix!

    I needed to add the curl cacert file to my php.ini
    Visit here to get the latest .pem file

    And add this line to your PHP.ini
    curl.cainfo="[path to your file]\cacert.pem"

    Now it all seems to be working!

    Plugin Author Aaron D. Campbell


    The ca cert is the right way to do it, but the development version I linked do is actually performing your previous workaround (setting CURLOPT_SSL_VERIFYPEER to false), but it works with other transport methods too (not just curl).

    Glad you got it working.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘https:// Errors’ is closed to new replies.