Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please create a php file with code

    <?php
    require('./wp-load.php');
    
    use WpOrg\Requests\Autoload;
    use WpOrg\Requests\Requests;
    use WpOrg\Requests\Response;
    
    if (class_exists('\WpOrg\Requests\Requests') && class_exists('\WpOrg\Requests\Autoload') && version_compare(PHP_VERSION, '5.6.0', '>=')) {
        Autoload::register();
    
        $complete_action = function($response, $id) {
            echo '<pre>';
            var_dump($response);
            echo '</pre>';
        };
    
        $requests = array(
            array('url' => 'https://ams3-worker.quic.cloud/', 'type' => 'GET',)
        );
    
        $options = array(
            'timeout' => 60,
            'connect_timeout' => 60,
            'complete' => $complete_action,
        );
    
        $responses = Requests::request_multiple($requests, $options);
    
    } else {
        echo 'No class';
    }
    

    at same dir as your wp-config.php , then open it in browser, see what it returns.

    Thread Starter xexax

    (@xexax)

    I get this

    object(WpOrg\Requests\Exception\Transport\Curl)#6806 (10) {
      ["message":protected]=>
      string(67) "77 error setting certificate file: /etc/pki/tls/certs/ca-bundle.crt"
      ["string":"Exception":private]=>
      string(0) ""
      ["code":protected]=>
      int(77)
      ["file":protected]=>
      string(65) "/home/digisolu/bwt.ba/wp-includes/Requests/src/Transport/Curl.php"
      ["line":protected]=>
      int(294)
      ["trace":"Exception":private]=>
      array(2) {
        [0]=>
        array(5) {
          ["file"]=>
          string(59) "/home/digisolu/bwt.ba/wp-includes/Requests/src/Requests.php"
          ["line"]=>
          int(585)
          ["function"]=>
          string(16) "request_multiple"
          ["class"]=>
          string(29) "WpOrg\Requests\Transport\Curl"
          ["type"]=>
          string(2) "->"
        }
        [1]=>
        array(5) {
          ["file"]=>
          string(30) "/home/digisolu/bwt.ba/test.php"
          ["line"]=>
          int(27)
          ["function"]=>
          string(16) "request_multiple"
          ["class"]=>
          string(23) "WpOrg\Requests\Requests"
          ["type"]=>
          string(2) "::"
        }
      }
      ["previous":"Exception":private]=>
      NULL
      ["type":protected]=>
      string(8) "cURLEasy"
      ["data":protected]=>
      object(CurlHandle)#6801 (0) {
      }
      ["reason":protected]=>
      string(64) "error setting certificate file: /etc/pki/tls/certs/ca-bundle.crt"
    }
    Plugin Support qtwrk

    (@qtwrk)

    string(67) "77 error setting certificate file: /etc/pki/tls/certs/ca-bundle.crt"

    this is the error , somehow the ca cert was not working properly

    the test code was calling wordpress and use its requests library to send a http request , nothign to do with any plugin but only wordpress core function.

    it looks like some server-side issue , please check with your hosting provider , maybe something like reinstall ca-cert ought do it

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image optimisation not working’ is closed to new replies.