Open SeventhCycle opened 4 years ago
I have the same problem, just with the deleteObject function, I also get the SignatureDoesNotMatch and I'm using DigitalOcean spaces
@tpyo - Can you please take a look at this?
Just odd that putObejct works fine, but not deleteObejct
Hello guys, I'm facing the same issue, using Linode Object Storage
I really hope it will be fixed, would hate begin using other overloaded classes just for that.
Hello guys! I could make it work using the v2 signature:
$s3 = new S3();
$s3->setAuth(AWS_S3_KEY, AWS_S3_SECRET);
$s3->setRegion(AWS_S3_REGION);
$s3->setEndpoint(AWS_S3_URL);
$s3->setSignatureVersion('v4');
// Uploader working with v4
$response = S3::putObject(foo,foo,foo);
// List working with v2
S3::setSignatureVersion('v2');
$list = $s3->listBuckets(true);
echo '<pre>';
print_r($list);
die;
I'm kind of new to the amazon s3 service, and I'm making a few tests in order to integrate it to a Legacy PHP application, so this class is really useful for me, any help/improvements will be really appreciated, I can collaborate also :)
Awesome @mblint-postcron, I'll test this in a bit (Using Digital Ocean spaces) and return back to you if it works for me too
@mblint-postcron, where do you see this $s3->setSignatureVersion('v4') function?
I can't find this function or one alike in the class?
@mblint-postcron, hmm.. I don't get where you find this function.
@mblint-postcron You there?
Hi @Conver, sorry I was OOO. You are right, this method is missing here in this S3 class. I don't know where I find this S3 file now, but seems to be a forked version maybe, check that:
https://gist.github.com/mblint-postcron/d54f6785df3dbeeb955bdd3d901c7127
Let me know if it's working with the v2
Thanks @mblint-postcron, it works perfectly now with the v2 version!
Thanks a lot.
Here is an code example that I have here while trying to connect to Linode's S3 cloud storage service:
As a result, I get this error: Warning: S3::listBuckets(): [403] Unexpected HTTP status in includes/S3.php on line 440
If I go into the file and print out the $rest object to get more information, I get:
On the other hand, if I change the above code to an amazon service:
Authentication works properly on Amazon's services.
Just to make sure this isn't a problem on Linode's end, I tried doing this on another third party (MojoCloud) and ran into the same issue.
Finally, just to make sure that the information is correct, I tried using aws-sdk-php beneath the tpyo library to see if I can connect to S3 using the same info:
And sure enough, this works for all three services (Amazon, MojoCloud, Linode). This way, I know the connection information is correct.
What I suspect here is a generalization problem with __getSignatureV4() where a valid signature is generated on amazon services, but not on non-amazon services.
Please let me know if any more information is needed here. If any of the maintainers here needs an access key / secret key to try troubleshooting this and debugging this on Linode's object service, please let me know.
Or if there's something obvious I'm missing, please let me know :)