easywechat icon indicating copy to clipboard operation
easywechat copied to clipboard

关于请求微信接口Curl报错提示Undefined constant "CURL_SSLVERSION_TLSv1_2"

Open huguijian opened this issue 1 year ago • 2 comments

我用的环境

  • 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

huguijian avatar Feb 02 '24 01:02 huguijian

贴一下代码,看看是怎么调用的。 再检查下配置,看看是不是传了http.crypto_method这个配置项进去。

wjfz avatar Feb 04 '24 18:02 wjfz

今天刚解决这个问题, 需要升级一下系统的curl版本, 保持版本在7.34.0及以后的版本.

Abbotton avatar Feb 12 '24 06:02 Abbotton

我的curl 版本是8.2.1 用的是lumen10 php8.1,w7corp/easywechat 版本号:6.15.0,还是这个错误啊

wangshengli0421 avatar Feb 22 '24 03:02 wangshengli0421