w7corp / easywechat

📦 一个 PHP 微信 SDK
https://easywechat.com
MIT License
10.26k stars 2.41k forks source link

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

Closed huguijian closed 6 months ago

huguijian commented 7 months ago

我用的环境

问题及现象

在使用授权登录时报错提示: Error: Undefined constant \"CURL_SSLVERSION_TLSv1_2\" in /data/wwwroot/ecrf/vendor/symfony/http-client/CurlHttpClient.php:125

wjfz commented 7 months ago

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

Abbotton commented 6 months ago

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

wangshengli0421 commented 6 months ago

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