3

I'm running into an error with CURL on our staging server when trying to connect to the EventBrite API, despite local and production servers connecting just fine:

[curl] 6: Could not resolve host: www.eventbriteapi.com; Name or service not known [url] https://www.eventbriteapi.com/v3/users/me/owned_events/?status=live%2Cstarted&order_by=start_asc&expand=category%2Cvenue%2Csubcategory%2Cformat%2Corganizer

We checked the curl command on the staging server which is also running normally. Any idea how to fix this?

Pang
  • 9,564
  • 146
  • 81
  • 122
Bowen Fan
  • 31
  • 2

2 Answers2

0

Check your curl url

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

change this to

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

remove / after owned_events

Shibon
  • 1,552
  • 2
  • 9
  • 20
0

It turns out to be a php-fpm issue - I found this article CURL and HTTPS, "Cannot resolve host"

Restarting php-fpm seems to be able to resolve the issue.

Bowen Fan
  • 31
  • 2