Hi,
ich probiere Daten über https zu holen, dabei bekomme ich folgenden Fehler:
QuoteWarning: 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$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.
QuoteDisplay Morephp -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
intl
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
pspell
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
i-MSCP 1.3.16
Weiß jemand an was es liegen könnte?
Danke im voraus.