I was surprised when I configured one site with BackWPup the same way I had a dozen or so times in the past. (Note: I use HostGator.) I made an Amazon S3 bucket just for that site, “backup.mysite.com”. I made an IAMs user with the same name, with a policy only granting it access (yes, including list and upload permissions) to that one bucket. I plugged in the Amazon S3 info to BackWPup and… Access Denied. I double-checked everything. I triple-checked everything. Exactly like I used for my other sites. Then I tried using Amazon S3 info from my other sites that were running regular BackWPup backups. Nothing worked.
Then I went into CPanel > PHP Configuration and changed the PHP handler to “default system handler (5.2)”. It worked! The difference between this site and the others was that I had to use a higher PHP version to get another plugin to work (completely reasonable, given that PHP 5.2 has been obsolete since 2011).
I spent two hours with tech support, trying to convince them the problem was on their end, with PHP configuration. Eventually they did some of their own testing and said this:
This morning I copied the site and data to a new server that had PHP 5.4 as the default handler, and after quite a bit of testing I can now give you my findings.
1) Using PHP 5.4.26 as the default handler fails at the S3 connection attempt.
2) Using PHP 5.3.28 fails at the S3 connection attempt.
3) Using PHP 5.2.17 always works.
4) Changing the backup method to Folder instead of S3 works for any PHP version. Attached is a screenshot showing the backup log when PHP was set to 5.4.26 and the backup type set to Folder.
At this point, since I’ve confirmed that it is not isolated to the PHP configuration on the reseller server, and I’ve also confirmed that the plugin works for any PHP version when the backup type is set to Folder, I must direct you to the plugin developer for trouble-shooting further as it appears there is a bug in the plugin code for the S3 connection when using PHP 5.3.28 or 5.4.26. Unfortunately, the logs do not contain enough detail to see exactly why the S3 connection code is failing when using a PHP version higher than 5.2.17. In the meantime, the Folder method can definitely be used.
I apologize that I wasn’t able to find a configuration that worked using the S3 backup method with this plugin. If you need any additional information when contacting the plugin developer about this, just let us know.
If this is a more widespread problem, could you tell me when a fix is expected to be released?
If, for some reason, other people run BackWPup Amazon S3 backups just fine using PHP 5.3 or higher, can you tell me perhaps what bit of PHP configuration is the culprit in my case, what we can fix on the host end to get the plugin running?
- The topic ‘"ERROR: S3 Service API: Access Denied" when using PHP 5.3 or 5.4’ is closed to new replies.