I am using s3-php5-curl to access my AWS S3 carpet.
The function getBucket()works fine and returns the result when I host the PHP application myself, but when I put the same code into the AWS EC2 instance (by default, AIM is Linux, Apache, PHP), I get the following error
Warning: S3::getBucket(): [51] Unable to communicate securely with peer: requested domain name does not match the server certificate. In /var/www/html/s3-php5-curl/S3.php on line 136 Warning: Invalid argument supplied for foreach() in /var/www/html/index.php on line 15
I can’t figure it out. What does this mean and how can I solve it?
EDIT: I noticed this as an answer, but I was wrong. I got in touch with the fact that the main problem seems to be whether you use the Amazon SDK or the php5-curl library. There seems to be a common problem affecting EC2 users in some regions who are trying to programmatically access their S3 buckets related to SSL certification, where the bucket name includes a full stop (aka period). It has been documented, but contains unresolved here .
source
share