所以首先是错误代码:
string(345) "
404 - Not Found
"
0
SSL: certificate subject name 'Common Name (eg, YOUR name)' does not match target host name 'www.example.com'
这是使用以下测试脚本找到的。
<?php
$request=<<<EOT
EOT;
$c = curl_init("https://www.example.com");
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($c, CURLOPT_POST, "POST");
curl_setopt($c, CURLOPT_POSTFIELDS, $request);
curl_setopt ($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($c, CURLOPT_SSL_VERIFYHOST, 2);
ob_start();
curl_exec($c);
$response = ob_get_contents();
ob_end_clean();
$curlErrorCode = curl_errno($c);
$error = curl_error($c);
var_dump($response);
echo "<br>";
echo $curlErrorCode."<br>";
echo $error."<br>";
curl_close ($c);
?>
实际的站点名称已更改,但我已经两次和三次检查了证书并且名称匹配。这是来自 Starfield Secure Certificate Authority - G2 的高级 SSL 证书
Subject section of SSL CERT
CN = www.example.com
O = EXAMPLE, INC.
L = City
S = State
C = US
SERIALNUMBER = 19xxxxxxxx
2.5.x.xx = Private Organization
1.3.x.x.x.x.xxx.xx.x.x.x = State
1.3.x.x.x.x.xxx.xx.x.x.x = US
为了使我们的支付系统合规,这个脚本必须干净地运行(这个网站没有上线,所以我们不接受不合规的付款)。但我一直无法弄清楚。有人知道为什么吗?
更多信息:
OS = MS Server 2012_R2
Platform = Hyper-v Virtual Instance (Hyper-v is installed on metal on MS Server 2012_R2)
Service = IIS 6.2 (build 9200)
Certificate is installed on IIS and bound to website.