只是想知道是否有人知道为什么亚马逊的AWS会告诉我"您提供的X509证书在我们的记录中不存在"。
这是我正在使用的代码...
$sqs = new AmazonSQS();
$queue_url = 'my_url';
$options = array(
'MaxNumberOfMessages' => 10,
);
$resp = $sqs->receive_message($queue_url, $options);
print_r($resp);
这是我得到的回应...
[Type] => Sender
[Code] => InvalidClientTokenId
[Message] => The X509 Certificate you provided does not exist in our records.
[Detail] => CFSimpleXML Object
这是我在config.inc中使用的CFCredentials数组.php...
'@default' => array(
'key' => 'my-key',
'secret' => 'my-secret',
'default_cache_config' => 'cache',
'certificate_authority' => FALSE
)
为了使用 Amazon SQS
,您必须专门注册 Amazon SQS ; 看起来您没有注册。您可以通过访问此页面并单击标有"注册 Amazon SQS"的按钮来执行此操作。
我收到此错误的原因是因为我使用的是没有使用 SSL 安装库尔的 MAMP PRO。 只有卷曲。
因此,为了解决这个问题,以便我可以从本地机器进行测试,下面的代码。 请注意第二行的"@"。 我使用它来抑制 disable_ssl() 方法发出的警告。
$s3 = new AmazonS3();
@$s3->disable_ssl();