Problem description
When using OSS PHP SDK, the following error is reported.
Use of undefined constant CURLOPT_CLOSEPOLICY - assumed
'CURLOPT_CLOSEPOLICY' in
D:\phptools\www\pia\oss_php_sdk_20140625\lib\requestcore\requestcore.class.php on line 610:
Cause
According to the preceding problem description, there are two reasons:
- removed CURLOPT_CLOSEPOLICY variables in PHP5.6.0.
- The curl command is not installed or the curl environment variable is specified.
Solutions
According to the above two reasons, there are the following two corresponding solutions.
- Since the official SDK has not been updated, you can use the corresponding code to delete CURLOPT_CLOSEPOLICY variables.
- Install the curl command or specify the curl environment variable.
Applicable scope
- Object Storage Service (OSS)