• Resolved Pexle Chris

    (@pexlechris)


    Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /var/www/wp-content/plugins/db-access-adminer/index.php on line 159
    
    Warning: file_get_contents(): Failed to enable crypto in /var/www/wp-content/plugins/db-access-adminer/index.php on line 159
    
    Warning: file_get_contents(https://mysite.gr/wp-json/lev0/db-access-adminer/conduit/): Failed to open stream: operation failed in /var/www/wp-content/plugins/db-access-adminer/index.php on line 159
    
    

    Could not communicate with WordPress. It may be being blocked.

    I get this messages…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Roy Orbitson

    (@lev0)

    Hi @pexlechris,

    The first error line you’re seeing seems to indicate the kind of issue this plugin is encountering. In order to isolate the Adminer program from WordPress, and vice versa, but still dynamically check for authentication, this plugin runs a background request to WordPress’ JSON API as if it were you. This request is secured by the same HTTPS protocol as the original request by your browser, even though it should only be a machine-local request.

    PHP itself (not specifically this plugin) cannot verify the certificate that’s being used by the web server (Apache/Nginx) when making this local request. This can be caused by knowingly using a self-signed (invalid) certificate, or your web server selecting the incorrect certificate. The latter can happen if your site is only listening on your public IP address, but PHP is connecting to a loopback address, e.g. 127.0.0.1, or something similar. I think you may have a misconfigured server.

    You can check what address PHP is trying to connect to with the following code, which will confirm the host name as PHP sees it, the address it will try to connect to by default, and then both the IPv4 and IPv6 records. So save it as a file like h.php on your server, then visit it in your browser.

    <?php
    header('Content-Type: text/plain');
    $h = $_SERVER['HTTP_HOST'];
    var_dump(
        $h,
        dns_get_record($h),
        dns_get_record($h, DNS_A),
        dns_get_record($h, DNS_AAAA)
    );
    Plugin Author Roy Orbitson

    (@lev0)

    Since I haven’t heard back from you, and this is extremely unlikely to be a fault in this plugin, I’m going to mark this resolved. If it were occurring for multiple users, and it didn’t look like a simple server config issue, I would investigate further. You don’t need to test with this plugin, the following code should be enough to trigger the same issue:

    <?php
    header('Content-Type: text/plain');
    var_dump(file_get_contents('https://mysite.gr/wp-json/'));
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Could not communicate with WordPress. It may be being blocked.’ is closed to new replies.