gpt4 book ai didi

php - Guzzle Curl 错误 60 SSL 无法获取本地发行者

转载 作者:IT王子 更新时间:2023-10-28 23:46:29 25 4
gpt4 key购买 nike

尝试使用 YouTube API v3 获取一些视频信息,使用服务描述符在 Symfony2 中使用 Guzzle。

当我运行脚本时,我得到了这个:

[curl] 60: SSL certificate problem: unable to get local issuer certificate [url] https://www.googleapis.com/youtube/v3/videos?id=2xbVbCoHBgA&part=snippet&key={MY_KEY}

500 Internal Server Error - CurlException

我的描述符是这样的:

{
"name": "YouTube",
"baseUrl": "https://www.googleapis.com",
"apiVersion": "v3",
"description": "YouTube GData Graph API",
"operations": {
"GetVideos": {
"httpMethod": "GET",
"uri": "/youtube/v3/videos",
"parameters": {
"id": {
"type":"string",
"location":"query",
"required": true
},
"part": {
"location": "query",
"default": "snippet"
},
"key": {
"location": "query",
"default": "{MY KEY}",
"static": true
},
"maxResults": {
"location": "query",
"default": 50
}
}
}
}
}

这是在本地 Ubuntu 14.04 开发环境上运行的,其中有一个非常基本的 LAMP 堆栈。

关于可能导致此问题的任何想法?

最佳答案

可能是它正在查找您站点的 SSL 证书。

如果是这种情况,请尝试禁用 SSL 认证:

$client->setDefaultOption('verify', false);

关于php - Guzzle Curl 错误 60 SSL 无法获取本地发行者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24923604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com