Failure after SSL installation cURL "error setting certificate verify locations: CAfile:"

edited September 2015 in General Help
  1. Installed SSL certificate few days back to my forum
  2. Turned ON Enable URL Rewriting through ACP
  3. Updated the Notify URL in profile of Reply Push Site....

Now getting Red Exclamation Mark or Notify URL ..

Note: Board has been updated to 3.1.6 Today

Ran a Bom Check But No errors.

Comments

  • I ve sent you a PM with the actual url

    it something like this for verification url

    https://unnathi.in/forum/app.php/replypush/ping/xxxxxxxxxxxxx

    and his is the Notification Url

    https://unnathi.in/forum/app.php/replypush/xxxxxxxxxxxxx

    Obviously these aren't the actual urls.

  • ok Now because i have turned on URL rewriting on my forum /app.php/ is not showing in the notify url at board

    I have disabled the URL rewriting on forum now so that app.php path is visible, and updated the notification url provided by you through PM

    still showing the Red exclamation mark.

  • url rewriting shouldn't make a difference. try saving the urls I gave you with your replyPUSH account

  • Tried again with the given url by you but still showing the RED exclamation at board

  • save it here

    http://beta.replypush.com/profile

    don't worry about the board.

    what is the url displaying in apc (please remove the code bit at the end)?

  • x00
    edited September 2015

    forget about the red x for the moment, I have verified the url sent to by PM is saveable in

    http://beta.replypush.com/profile

  • At profile https://unnathi.in/forum/app.php/replypush/xxxxxxxxxxxxxxxxx as provide by you . Notifications are coming to email inbox but replies are not getting posted back to forum

  • First check access logs for the url, also check error log for anything relevant.


  • x00
    edited September 2015

    Please run this from the same server first changing the xxxxxxxxxxxxxxx part of $ping_url to match the code in your url. (Ensure you are using the ping url not notification url).

    <?php
    
    // Please change to your ping url
    
    $ping_url = 'https://unnathi.in/forum/app.php/replypush/ping/xxxxxxxxxxxxxxx';
    
    class TestCurl {
        /**
        * cURL installed?
        *
        * Is cURL installed?
        *
        * @return bool
        */
        public function curl_installed()
        {
            return
                function_exists('curl_init')
                && function_exists('curl_setopt')
                && function_exists('curl_exec')
                && function_exists('curl_close');
        }
    
        /**
        * Proxy Init
        *
        * Setup up cURL
        *
        * @param    string  $url
        * @return   object
        */
        public function proxy_init($url)
        {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_USERAGENT, 'phpBB replyPUSH Tester/0.1');
            return $ch;
        }
    
        /**
        * Is OK
        *
        * Check url returns OK
        *
        * @param    string  $url
        * @return   string
        */
        public function is_ok($url)
        {
            $ch = $this->proxy_init($url);
            $response = curl_exec($ch);
    
            if ($response === false) {
                echo 'cURL error: ' . curl_error($ch)."\n";
            }
    
            curl_close($ch);
            $is_ok = $response == 'OK';
            return $is_ok;
        }
    
    }
    
    $tc = new TestCurl();
    if ($tc->curl_installed())
    {
        if ($tc->is_ok($ping_url))
        {
            echo "cURL is working!";
        }
        else
        {
            echo "cURL is NOT working!";
        }
    }
    else
    {
        echo "cURL not installed";
    }
    
  • edited September 2015

    got this message

    cURL is NOT working!

  • did you use the ping url?

    https://unnathi.in/forum/app.php/replypush/ping/xxxxxxxxxxxxxxx

    add

    if ($response === false) {
        echo 'cURL error: ' . curl_error($ch);
    }
    

    bellow

    $response = curl_exec($ch);
    

    in the original code

    and try again

  • edited September 2015

    In the profile (beta.replypush.com) i'm using the url https://unnathi.in/forum/app.php/replypush/xxxxxxxxxxxxxxx

    and in the file to run from server i'm using the ping url https://unnathi.in/forum/app.php/replypush/ping/xxxxxxxxxxxxxxx

    After adding the new code i'm getting the message

    cURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
    cURL is NOT working!
    
  • cURL is not properly setup or configured to work with a cert-bundle on your server.

    if you google the issue: https://www.google.co.uk/search?q=error+setting+certificate+verify+locations:+CAfile

    You will see others who have experienced this.

    I suggest you talk to your host and get them to help you.

    This extension requires cURL to work, so it is a non-starter it is doesn't. There is probably nothing wrong with cURL itself but needs some configuration. However is is something for the sys admin to set up, it is beyond extension support.

    The sys admin could use the test given, to check it is working.

    In the next release of this extension there will be more error logging. This won't solve issues but will mean that the extra steps to diagnosis will be mostly redundant as the information will be already logged.

    Best of luck!

  • Ok Will Keep you posted once i get the reply from the host

  • After the escalation they have done something and after running the same file it is showing cURL is NOT working!

    The cURL error message is not showing now.

  • If they have done something. You should contact them.

    They are responsible for stuff like this.

  • They are now saying cURL is working fine and given a test url for checking https://unnathi.in/test.php

    the code given by them is follows

    <?php function nxs_cURLTest($url, $msg, $testText){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); $response = curl_exec($ch); $errmsg = curl_error($ch); $cInfo = curl_getinfo($ch); curl_close($ch); echo "Testing ... ".$url." - ".$cInfo['url']."<br />"; if (stripos($response, $testText)!==false) echo "....".$msg." - OK
    "; else { echo "....".$msg." - Problem
    "; 
            print_r($errmsg); 
            print_r($cInfo); 
            print_r(htmlentities($response)); 
            echo "
    There is a problem with cURL. You need to contact your server admin or hosting provider."; } } nxs_cURLTest("http://www.google.com/intl/en/contact/", "HTTP to Google", "Mountain View, CA"); nxs_cURLTest("https://www.google.com/intl/en/contact/", "HTTPS to Google", "Mountain View, CA"); nxs_cURLTest("https://www.facebook.com/", "HTTPS to Facebook", 'id="facebook"'); nxs_cURLTest("https://www.linkedin.com/", "HTTPS to LinkedIn", 'link rel="canonical" href="https://www.linkedin.com/"'); ?>
  • The test you should show them is mine, if it is not working. Give them my code. Remember to replace the xxxxxxxxxxxxxxx.

  • Further escalation to the host done the trick. replyPush now working over https as well on my forum

  • thanks for letting us know.

Login In or Sign Up to comment.