easywechat
easywechat copied to clipboard
关于请求微信接口Curl报错提示Undefined constant "CURL_SSLVERSION_TLSv1_2"
我用的环境
- PHP 版本:8.1.16
- overtrue/wechat 版本:w7corp/easywechat 版本号:6.8.0
- 是否使用了框架?框架名称:webman
问题及现象
在使用授权登录时报错提示: Error: Undefined constant "CURL_SSLVERSION_TLSv1_2" in /data/wwwroot/ecrf/vendor/symfony/http-client/CurlHttpClient.php:125
贴一下代码,看看是怎么调用的。
再检查下配置,看看是不是传了http.crypto_method
这个配置项进去。
今天刚解决这个问题, 需要升级一下系统的curl版本, 保持版本在7.34.0及以后的版本.
我的curl 版本是8.2.1 用的是lumen10 php8.1,w7corp/easywechat 版本号:6.15.0,还是这个错误啊