[Resolved] Curl error 7

Home Forums Support Curl error 7

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1464452
    Bill

    Hi there

    I am not sure when the health check errors below first started. NB This is not the curl timeout error.

    Curl is operational on the server as tested via: curl_init(“https://www.generatepress.com/”); which does pull through your site.

    I have installed WordPress and GP Premium and my selected theme and all other plugins on a subdomain of my problem domain and don’t get the error. My hosting company (1and1) blame a plugin. transport/curl.php looks is the right filesize.

    The https site is live in every other respect and I am using the same .htaccess file on my test subdomain as I have used on my problem domain. WordPress seems fine and all WordPress page building functions seem fine.

    I was under the impression that a plugin could not change anything about the WordPress installation so if I have installed a plugin and then uninstalled it (possible) then there should be no impact surely.

    So what are the possible causes of this error and will it affect my Generatepress installation apart from not being able get autoupdates?

    Thanks

    Bill

    The REST API encountered an error
    The REST API request failed due to an error.
    Error: cURL error 7: Failed to connect to www.{maydomain} port 443: Connection refused (http_request_failed)

    Your site could not complete a loopback request
    The loopback request to your site failed, this means features relying on them are not currently working as expected.
    Error: cURL error 7: Failed to connect to www.{mydomain} port 443: Connection refused (http_request_failed)

    #1464863
    David
    Staff
    Customer Support

    Hi there,

    Plugins can create issues that result in cURL errors although thats generally a 28 timeout error, so good place to start is temporarily disabling all other plugins tom see if that resolves the issue.

    After that if the issue persists i would speak to the Host – it may be a simple config issue that they can easily resolve.

    #1464892
    Bill

    Hi David

    Thanks for getting back to me.

    If I rename the plugins folder which will bulk deactivate all plugins and then rename the folder back and bulk reactivate all plugins will there be an ongoing impact on the site, ie does deactivate / activate change any of the plugin settings?

    Thanks

    Bill

    #1464981
    David
    Staff
    Customer Support

    Deactivating plugins will not reset any settings as they are saved in your Database, and will re-apply upon re-activating a plugin.

    #1469349
    Bill

    Hi David

    This Rest API cURL 7 error is now being traced by 1and1 IONOS having hopefully proven that the issue is at domain level using a block of php code to test to see if cURL pulls through data or not. (See below).

    Below is the code if proves useful to anyone. It takes WordPress out of the equation entirely by testing directly using php.

    Regards

    Bill

    curltest.php
    —————————————————————-
    <?php
    $url=$_GET[‘url’];
    if (!isset($_GET[‘url’])) {
    print(“<p>No URL supplied as a url parameter ie ?url=”);
    exit;
    }
    $ch = curl_init($url); // initialize curl handle
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    $data = curl_exec($ch);
    if ($data===””) {
    print(“$data);
    } else {
    print(“<p>No data to print – cURL blocked!!”);
    }
    ?>
    —————————————————————-

    Usage curltest.php?url={full-url-to-test-that-does-resolve-in-the-browser}.

    #1470286
    David
    Staff
    Customer Support

    Did Ionos resolve the issue ?

    #1470299
    Bill

    Hi David

    In progress. They were initially blaming a WordPress plugin despite being told that the test installation was a fresh installation with no plugins at all. The issue is now being evaluated by second level support who may be more diligent.

    The issue affects primary www. domains on https sites. Sub domains of https sites and http sites are unaffected. clickandbuild WordPress installations may be unaffected (untested). I personally don’t like the idea of their one click installations since that may affect a site’s portability in the case of moving to a different hosting company.

    Regards

    Bill

    #1470350
    David
    Staff
    Customer Support

    Well i hope they find a fix before you decide to move hosts 🙂

    #1583951
    Bill

    This has now finally been resolved by 1and1.

    The issue was caused by misconfiguration of the domain and affected the www. subdomain only. The a record IP address was pointing to the wrong IP address.

    If anyone sees the Curl error 7 in a shared hosting environment lookup the IP address for the primary domain versus sub domains and see if there are differences.

    #1583988
    David
    Staff
    Customer Support

    Glad to hear you got it resolved

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.