Is anyone else having issues requesting https resources?
I am getting 500 - Internal server error with this script:
<? echo file_get_contents('https://www.google.com'); ?>
This works fine:
<? echo file_get_contents('http://www.google.com'); ?>
I get the same thing when using CURL:
$ch = curl_init();
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_URL, 'https://www.google.com');
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
echo curl_exec ($ch);
Again, http://www.google.com always works.
I've had periods where it works, but https requests it mostly fail.
I've caught a verbose response from CURL a few times also:
URL = https://www.google.com
* Rebuilt URL to: https://www.google.com/ * Trying 126.96.36.199... * TCP_NODELAY set * Connected to www.google.com (188.8.131.52) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: C:\Program Files (x86)\Parallels\Plesk\Additional\PHPSettings\cacert.pem CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.google.com:443 * Closing connection 0
Tech support told me it was my scripting issue, but I would argue a file_get_contents request (wrapped in a try..catch block even) should never cause a 500 error!