tpyo / amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5/CURL
1.03k stars 503 forks source link

Error Code 77 on putObject() method #151

Closed ryan191188 closed 5 years ago

ryan191188 commented 5 years ago

Hi,

Recently I have experienced this error code of 77 when uploading images to S3 storage, which occurs near this method $s3->putObjectFile($fileName, BUCKET, $folder, S3::ACL_PUBLIC_READ);

I could not get any error message from it and also this happens on and off. Might it be due to CA certificates as I'm seeing elsewhere online that code 77 might be due to CA cert configuration.

Below is the response from PHP side, I'm not sure if it might be useful:

S3Request Object ( [verb:S3Request:private] => PUT [bucket:S3Request:private] => uparcel [uri:S3Request:private] => /uploads/order/1550075468_deliverynote.png [resource:S3Request:private] => /uparcel/uploads/order/1550075468_deliverynote.png [parameters:S3Request:private] => Array ( )

[amzHeaders:S3Request:private] => Array
    (
        [x-amz-acl] => public-read
    )

[headers:S3Request:private] => Array
    (
        [Host] => uparcel.s3.amazonaws.com
        [Date] => Wed, 13 Feb 2019 16:31:08 GMT
        [Content-MD5] => HgNGqnmXmFEQXbqQEbFRQw==
        [Content-Type] => image/png
    )

[fp] => Resource id #25
[size] => 77751
[data] => 
[response] => stdClass Object
    (
        [error] => Array
            (
                [code] => 77
                [message] => 
                [resource] => /uparcel/uploads/order/1550075468_deliverynote.png
            )
    )

)

Appreciate your help:)

tpyo commented 5 years ago

You're probably right about it being CA related.

Feel free to reopen if you can reproduce.