callmez / yii2-wechat-sdk

基于Yii2实现的微信API(公众号,企业号)高效率(绝对的!)SDK.
MIT License
324 stars 158 forks source link

这是bug吗?跟php版本有关吗?我的是5.5.3 网上都没有解决办法 #38

Closed mechnaic closed 8 years ago

mechnaic commented 8 years ago

Use of undefined constant CURL_SSLVERSION_TLSv1 - assumed 'CURL_SSLVERSION_TLSv1'

PHP Notice – yii\base\ErrorException Use of undefined constant CURL_SSLVERSION_TLSv1 - assumed 'CURL_SSLVERSION_TLSv1'

1. in /data/wwwroot/default/weixin/vendor/callmez/Wechat.php at line 2558
2549255025512552255325542555255625572558255925602561256225632564256525662567

                }
                curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
                break;
            default:
                throw new InvalidParamException("Invalid http type '{$type}.' called.");
        }
        if (stripos($url, "https://") !== false) {
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); // 微信官方屏蔽了ssl2和ssl3, 启用更高级的ssl
mechnaic commented 8 years ago

已经解决,找了好久啊啊,secret复制粘贴多了一个空格,哇哇哇