Twitter Widget Pro
[resolved] https:// Errors (6 posts)

  1. Dduckster
    Posted 3 years ago #

    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.


  2. Aaron D. Campbell
    Plugin Author

    Posted 3 years ago #

    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: https://github.com/OpenRange/twitter-widget-pro/archive/master.zip

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

  3. Dduckster
    Posted 3 years ago #

    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!

  4. Dduckster
    Posted 3 years ago #

    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.

  5. Dduckster
    Posted 3 years ago #

    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 http://curl.haxx.se/docs/caextract.html

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

    Now it all seems to be working!

  6. Aaron D. Campbell
    Plugin Author

    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Twitter Widget Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic