Aws-sdk-php: Incompatible in PHP5.6

Created on 31 Dec 2014  路  4Comments  路  Source: aws/aws-sdk-php

When I upgraded the PHP version from 5.5 to 5.6, the PHP Notice happen:

PHP Notice: Use of undefined constant CURLOPT_CLOSEPOLICY - assumed 'CURLOPT_CLOSEPOLICY' ....
lib/requestcore/requestcore.class.php on line 626

This constant has been removed in PHP5.6
http://php.net/manual/en/function.curl-setopt.php

Please update the SDK. Thank you so much!

Most helpful comment

This is the issue tracker for Version 2+ of the SDK. You seem to be using Version 1 of the SDK, which we no longer support. However, we recently accepted a pull request on the Version 1 repository that fixes your issue. You can download a zip of the source of the amazonwebservices/aws-sdk-for-php repo if you need the fix. It's also just a one line change if you want to patch your current copy.

All 4 comments

This is the issue tracker for Version 2+ of the SDK. You seem to be using Version 1 of the SDK, which we no longer support. However, we recently accepted a pull request on the Version 1 repository that fixes your issue. You can download a zip of the source of the amazonwebservices/aws-sdk-for-php repo if you need the fix. It's also just a one line change if you want to patch your current copy.

Thanks for your reply. I am using 2.7.11 which is not Version 1 of the SDK. BTW, I have fixed this issue by myself and just to report what happen after PHP upgraded.

The file lib/requestcore/requestcore.class.php only exists in v1.x.

remove this line curl_setopt($curl_handle, CURLOPT_CLOSEPOLICY, CURLCLOSEPOLICY_LEAST_RECENTLY_USED) from file lib/requestcore/requestcore.class.php because This option is deprecated.

Was this page helpful?
0 / 5 - 0 ratings