【问题标题】:PHP - Guzzle\Http\Exception\CurlException - Craft CMSPHP - Guzzle\Http\Exception\CurlException - Craft CMS
【发布时间】:2018-10-26 00:14:58
【问题描述】:

在尝试连接到 EventBrite API 时,我在登台服务器上遇到了 CURL 错误,尽管本地和生产服务器连接正常:

[curl] 6:无法解析主机:www.eventbriteapi.com;名称或服务未知 [url] https://www.eventbriteapi.com/v3/users/me/owned_events/?status=live%2Cstarted&order_by=start_asc&expand=category%2Cvenue%2Csubcategory%2Cformat%2Corganizer

我们在运行正常的登台服务器上检查了 curl 命令。知道如何解决这个问题吗?

【问题讨论】:

    标签: php curl eventbrite craftcms


    【解决方案1】:

    检查你的 curl 网址

    [url] https://www.eventbriteapi.com/v3/users/me/owned_events/?status=live%2Cstarted&order_by=start_asc&expand=category%2Cvenue%2Csubcategory%2Cformat%2Corganizer
    

    把这个改成

    [url] https://www.eventbriteapi.com/v3/users/me/owned_events?status=live%2Cstarted&order_by=start_asc&expand=category%2Cvenue%2Csubcategory%2Cformat%2Corganizer
    

    在owned_events之后删除/

    【讨论】:

      【解决方案2】:

      原来是 php-fpm 问题 - 我发现这篇文章 CURL and HTTPS, "Cannot resolve host"

      重启php-fpm似乎可以解决问题。

      【讨论】:

        猜你喜欢
        • 2014-10-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-08-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多