I'm getting an error when trying to send a backup to Amazon S3:
user warning: S3::putObject(): [SignatureDoesNotMatch] The request signature we calculated does not match the signature you provided. Check your key and signing method. in /home/content/92/1234312/html/mysite/sites/all/modules/backup_migrate/includes/S3.php on line 357.
I have used this feature on other sites before without problems, and have other Drupal sites backing up to this same Amazon S3 account. The bucket name is all lowercase and there's no trailing spaces on the Access Key.
This is on GoDaddy shared hosting, but I have successfully backed up other sites on GoDaddy to Amazon without getting this message.
Any ideas of things to check?
Thanks!
Comments
Comment #1
iamsixstringz commentedAre you using the older, more stable version of s3.php?
I had the same problem, then replaced the new version with the old. (grab it here>> http://undesigned.org.za/2007/10/22/amazon-s3-php-class)
I had to go in and change
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);to
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);to get rid of another error.
Now, I'm past the error you brought up, and now I'm on to trying to figure out why it won't recognize that the bucket I KNOW I created, and claims that it does not exist.
I read another issue here earlier where the problem that caused the [SignatureDoesNotMatch] error was preceding spaces in the secret key. Hope this helps you a bit.
*edit* - It wouldn't recognize the bucket because I had named it in all caps. Even though I used caps when naming the destination in the B&MM, it still wouldn't work. I Created a new bucket with the name in all lowercase, edited the B&MM dest. and voila!!
Comment #2
ronan commentedIs this still an issue? Reopen if it is.
Comment #3
sonicthoughts commentedI had exactly the same issue - why do we set CURLOPT_FOLLOWLOCATION to true?
Comment #4
ronan commentedwhy do we set CURLOPT_FOLLOWLOCATION to trueI have no idea. I didn't write the S3 library. If you think there's a bug in it you should open an issue on the github for that project:
https://github.com/tpyo/amazon-s3-php-class
Also make sure you're using the 0.4.0 version of the library as people have had problems getting the development version to work. Your post does not make it clear which library you're having a problem with.
Comment #5
sonicthoughts commentedNo - there is no bug. the only issue is that it defualts to curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); This needs to be overwritten to curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false); or at least noted in the installation instructions. not sure what it does though but seems to work this way ....