error when connecting to amazon s3

Hi, I created an user on aws, set up the "AmazonS3FullAccess" policy and generated the access keys.

But I get an error on wordpress when trying to choose the bucket or test connection.

Unknown: errno:2 curl_setopt() expects parameter 2 to be long, string given /mywebsite.com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/lib/requestcore/requestcore.class.php on line 621

Thanks for pointing out the potential issue reason. I've checked the Snapshot's code and it is indeed a code error. It's actually made by Amazon as our Snapshot plugin uses their official SDK (php library) to connect to AWS.

The CURLCLOSEPOLICY_LEAST_RECENTLY_USED constant is however deprecated. Further more, it most likely never worked and was never implemented in cURL. As now it's not even existing, PHP will generate warning.

Attached to this post is a zip file with a quick fix. Please follow these steps:

1. download the file
2. unpack it to your local storage
3. access your site with FTP
4. go to this folder:

5. rename "requestcore.class.php" file to something like "requestcore.class.OLD.php"
6. upload the "requestcore.class.php" file from unpacked archive to this folder.

Please keep in mind that's not an official update since the AWS connection library was written by Amazon developers and until they update it there will most likely be no ultimate solution to this. Also, you might need to repeat the steps above after plugin's update if the same warning will occur again.

How do you rate me?

Thank you for rating your experience!

We’re thrilled to hear you had a great experience with . Would you like to leave a comment about your experience?
Thanks for voting on your experience with , we’d love to get some feedback please.
Ohh no! We’re really sorry to hear you didn’t have a pleasant experience with , we’re always looking at how we can improve and would appreciate you provide some further feedback here please.
Type your feedback here

it's great that you had a positive one. Based on your experience in this ticket would you please be kind enough to rate us externally on: