fsockopen(): SSL operation failed

  • Hi,


    ich probiere Daten über https zu holen, dabei bekomme ich folgenden Fehler:

    Quote

    Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/virtual/xxx/htdocs/fsock.php on line 5 Warning: fsockopen(): Failed to enable crypto in /var/www/virtual/xxx/htdocs/fsock.php on line 5 Warning: fsockopen(): unable to connect to ssl://pagodabox.com:443 (Unknown error) in /var/www/virtual/xxx/htdocs/fsock.php on line 5 aus


    Der Code testet nur ob die Verbindung möglich ist:


    PHP
    1. <?php$host = 'pagodabox.com';$response = "";if ( $fp = fsockopen("ssl://{$host}", 443, $errno, $errstr, 30) ) { $msg = 'GET / HTTP/1.1' . "\r\n"; $msg .= 'Host: ' . $host . "\r\n"; $msg .= 'Connection: close' . "\r\n\r\n"; if ( fwrite($fp, $msg) ) { while ( !feof($fp) ) { $response .= fgets($fp, 1024); } } fclose($fp);} else { $response = false;}if ($response == false){echo($errno);echo($errstr);}else{echo("an");}?>





    Das Ganze über http:// funktioniert ohne Probleme.



    i-MSCP 1.3.16



    Code
    1. uname -aLinux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux


    Code
    1. PHP 5.6.29-0+deb8u1 (cli) (built: Dec 13 2016 16:02:08)Copyright (c) 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


    Code
    1. OpenSSL 1.0.1t 3 May 2016


    Weiß jemand an was es liegen könnte?


    Danke im voraus.

    Edited 2 times, last by _pAt: doch nicht :D ().