zoukankan      html  css  js  c++  java
  • 解决AWS S3 报SSL (60) 错误

    环境 : xampp

    php : 7.3

    在更新了PHP版本之后显示调用S3的 doesObjectExist 一直显示失败, 然后打开调试模式

    try {
        self::$obj = new S3Client([
            // 地区 亚太区域(新加坡) ap-southeast-1
            'region' => self::$config['region'],
    
            //
            'version' => self::$config['version'],
    
            // 加载证书
            'credentials' => new Credentials(self::$config['key'], self::$config['secret']),
    
            // 开启bug调试
            'debug' => true
    
        ]);
    } catch (S3Exception $e) {
        Log::record($e->getMessage());
        die();
    }

    显示报错误为,

    cURL错误60:SSL证书问题:无法获取本地颁发者证书(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html ) 

    排查了下发现是php.ini里面的 curl.cainfo  没有设置, 

    [curl]
    ; A default value for the CURLOPT_CAINFO option. This is required to be an
    ; absolute path.
    ; curl.cainfo =

    修改完, 重启服务, 错误完美解决

    参考链接

    https://stackoverflow.com/questions/38667165/amazon-s3-upload-error-ssl-certificate-issues

    https://www.656463.com/wenda/AmazonS3sccwSSLzswt_391

    https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-examples-creating-buckets.html

  • 相关阅读:
    cron表达式详解
    C# Quartz 调度任务辅助类
    SQLserver查询用逗号隔开的字段中是否包含另一个字段的值
    c# 将字符串转换为逻辑表达式(字符串转换布尔)
    铺砖块
    字符串涂漆
    快餐店
    乘号加号
    传纸条(lgP1006)
    小明的喷漆计划
  • 原文地址:https://www.cnblogs.com/http-500/p/14836921.html
Copyright © 2011-2022 走看看