• Bottom of the page should show recent check ins, has been working for a few years, but just checked and now I only have this:

    cURL error 51: SSL: no alternative certificate subject name matches target host name ‘api.untappd.com’

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    haven’t ignored, but haven’t had a chance to circle back to this quite yet.

    Biggest questions from me at the moment, are if anything changed on the server side for you, even if you’re not using SSL/HTTPS yourself for your site. Feels like some communication issues between your site and Untappd’s API.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    just in case, any changes here?

    Thread Starter animalfield

    (@animalfield)

    I haven’t changed anything except updated WordPress. Unfortunately I didn’t check the feed to see if it was displaying properly before I updated so not sure if the update was the cause.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’d be surprised if the WP update helped at all, since this would be a server-level issue. Only way I could see it potentially helping, is if something with wp_remote_get() and the like were touched somehow.

    Thread Starter animalfield

    (@animalfield)

    Michael, really appreciate the time to check in and go over this with me, means a lot to have developer support!

    That said, plugin still failing. I added an SSL to my site (shared), and added Really Simple SSL to ensure everything is going through the SSL. I then contacted my hosting support, they looked at the error and decided that it was due to a problem with the plugin. Seemed like the support tech probably just didn’t have information on that error so punted it back to me.

    If there’s any way you could give me a direction to go to start figuring this out I’d appreciate it. It was a great tool for our site and would hate to lose it!

    -Mike

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Some thoughts regarding this, and it’s definitely not trying to dismiss anything.

    I don’t directly use cURL at all in the plugin. I use WordPress’ HTTP API for all my data retrieval. That’s not to say that WordPress internally determines that cURL is the best tool to use, or potentially the only tool, just saying it’s not a decision I make.

    I’m curious if allow_url_fopen and PHP core functionality like file_get_contents() is enabled for your account/server. I know from personal experience in some dayjob work, that it may not be. Reason I ask is because if it’s not, and can be made available, perhaps that’ll help resolve the issue as a whole by not having to use cURL.

    Based on my searching, the error reported above, is more about the communication between the server and the remote destination, in this case Untappd’s API. This isn’t really something resolved by adding SSL/HTTPS to your site, though I wholly encourage it for everyone. I do wonder what the current cURL version is for your hosting, and if it’s relatively recent or wholly outdated by years. Other items to check would be OpenSSL version. While not the same type of things being attempted, this short post outlines a lot of what I think we’re seeing here https://lokeshsharma.xyz/development/wordpress/curl-error-51-ssl-no-alternative-certificate-subject-name-matches-target-host-name/

    Thread Starter animalfield

    (@animalfield)

    Thanks for the feedback, I took your suggestion and dug around in the phpinfo file. I found current version of cURL is 7.4.5, OpenSSL is 1.0.1e, and allow_url_fopen is enabled. PHP version is 7.3 so I think file_get_contents() is enabled but not sure how to verify.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Wish I had more answers for you, at this point. I still feel it’s at the hosting/server level for your instance. I also haven’t seen any issues with the widget/plugin in my own sites, or heard from anyone else regarding it. So at minimum, it’s not a widespread thing. I also don’t have, nor am I requesting, extra access to your hosting account to try and troubleshoot this myself. Hosting support, perhaps elevated above tier 1, could help. Unsure what else you may have on your site that could also be using cURL requests for external data requests.

    Thread Starter animalfield

    (@animalfield)

    Right, well thanks for taking a stab at it either way. I talked to my host again and they suggested this:

    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);

    Only problem I can see is that you don’t use cURL anywhere in the plugin.

    I tried disabling all the other plugins on my website except the Untappd, but no avail. Sadly, I guess it’s time to move on, it was a really cool thing that I think added a unique feature to our site. What can ya do?

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    if at all possible, ask for higher up tech support, who may have more information regarding the sysadmin level of things for the server you’re on. Tinkering with active plugins and whatnot isn’t going to affect anything because the error is not at the WP level, it’s at the server level and the configuration there.

    That said, give me a little bit more time, as I may be on to something. Don’t give up on my lil plugin quite yet!

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    So I got to thinking, and given the nature of WP any way, what if there was a way to filter in cURL args for requests in the internal guts of WP.

    Turns out there may be, and i found some quick examples that I can mimic.

    Give this a try:

    function animalfield_untappd_curl_edits( $handle, $request_args, $request_url ) {
    	if ( false === strpos( $request_url, 'api.untappd.com' ) ) {
    		return;
    	}
    	
    	curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
    	curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );
    }
    add_action( 'http_api_curl', 'animalfield_untappd_curl_edits', 10, 3 );
    

    It’s going to run when WP is doing a cURL request, and in this function above I do a check to see if the current request is for the API with my plugin. If it’s not, we return early so that we’re not affecting every cURL request made, we just want ours.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘cURL error 51. Feed not displayed’ is closed to new replies.