hybinet wrote:
It will be really difficult to diagnose the issue unless more descriptive error messages can be captured. At the very least, we need to know what HTTP status code PayPal is returning, if at all.
I just tried a bunch of file_get_contents() function calls, and they all emit a descriptive warning (as well as returning FALSE) when any of the following errors occur: DNS resolution failure, unresponsive server, 403 forbidden, 404 not found, and 500 internal server error. If you're seeing FALSE but not an actual error message,
check your error reporting settings again. Try producing obvious errors to confirm that error messages are actually being displayed/recorded.
If that fails, you'll need to find out the source of the error some other way. Did you write the code that contains the file_get_contents() function call in question? If it uses POST, I guess you already know how to juggle stream contexts and whatnot. Could you rewrite it to use something like the
Requests library? That will allow you to see the HTTP status code, various headers, and all sorts of other information that file_get_contents() doesn't give you.
I understand this is a very frustrating situation for you. But since networking seems to be working fine according to you, I can't think of any obvious culprit.
If the above sounds like too much trouble, just cancel Linode A and use Linode B

just tried to
Code:
<?php
$w = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n";
echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n";
echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n";
echo 'wrappers: ', var_dump($w);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.paypal.com");
curl_exec($ch);
echo curl_error($ch)."\n";
curl_close($ch);
?>
get the result
Quote:
openssl: yes
http wrapper: yes
https wrapper: yes
wrappers: array(16) {
[0]=>
string(13) "compress.zlib"
[1]=>
string(4) "tftp"
[2]=>
string(3) "ftp"
[3]=>
string(6) "telnet"
[4]=>
string(4) "dict"
[5]=>
string(4) "ldap"
[6]=>
string(5) "ldaps"
[7]=>
string(4) "http"
[8]=>
string(5) "https"
[9]=>
string(4) "ftps"
[10]=>
string(3) "php"
[11]=>
string(4) "file"
[12]=>
string(4) "glob"
[13]=>
string(4) "data"
[14]=>
string(4) "phar"
[15]=>
string(3) "zip"
}
GnuTLS recv error (-9): A TLS packet with unexpected length was received.