Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl error 77 #982

Closed
birdol opened this issue Oct 24, 2017 · 5 comments
Closed

Curl error 77 #982

birdol opened this issue Oct 24, 2017 · 5 comments

Comments

@birdol
Copy link

birdol commented Oct 24, 2017

我用的环境

PHP 版本:7.1.8
overtrue/wechat 版本:4.0
是否使用了框架?框架名称:原生php

问题及现象

$app = Factory::officialAccount($options);
$oauth = $app->oauth;
$user = $oauth->user();

最后一行提示 cURL error 77

$options中

    'http' => [
        'retries' => 1,
        'retry_delay' => 500,
        'timeout' => 5.0,
        'base_uri' => 'https://api.weixin.qq.com/',
        'verify' => '/path/cert.pem', //这个路径是正确可以访问的
    ],

我尝试把:

'verify' => false; 

还是提示这个错误.直到我把wechat/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

$conf[CURLOPT_SSL_VERIFYHOST] = 2;
$conf[CURLOPT_SSL_VERIFYPEER] = true;

改成了

$conf[CURLOPT_SSL_VERIFYHOST] = 0;
$conf[CURLOPT_SSL_VERIFYPEER] = false;

问题才得到解决,这个坑要怎么填....? 求指点.

@overtrue
Copy link
Collaborator

贴一下错误详情

@overtrue overtrue reopened this Oct 24, 2017
@birdol
Copy link
Author

birdol commented Oct 24, 2017

cURL error 77: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
wechat/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php 187行

185 | $error = isset($connectionErrors[$easy->errno])
186 | ? new ConnectException($message, $easy->request, null, $ctx)
187 | : new RequestException($message, $easy->request, $easy->response, null, $ctx);

@overtrue
Copy link
Collaborator

77 报错应该会有一条消息才对吧,说证书问题

@overtrue overtrue closed this as completed Dec 8, 2017
@cute001
Copy link

cute001 commented Aug 27, 2019

@birdol 你怎么解决的,我的也报个错

@TheNorthMemory
Copy link
Contributor

更新操作系统 CA 证书,详询 公众平台接口证书更换通知@2018年07月13日

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants