oembed: Getting PHP Error when trying to fetch the providers list

Hi There,

When I am trying to curl to the providers URL I am getting following.

`Fatal error: Uncaught Error: Call to undefined function yaml_parse_file() in /var/www/html/oembed.com/www/json.php:14 Stack trace: #0 {main} thrown in /var/www/html/oembed.com/www/json.php on line 14

  • Connection #0 to host oembed.com left intact
  • Closing connection 0 `

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 19 (2 by maintainers)

Most upvoted comments

Cloudfront is showing this with an age of 31000, ie about 8 hrs, so I’m not sure the purge worked

Still not working from France

I tested a few IPs listed on https://www.whatsmydns.net/#A/oembed.com

Also failing from France on 143.204.226.104 (CDG3-C1).

once all caches empty (should be in the next 10 mins) then it should be functional everywhere

Hi @amjad1233

We had this issue crop up in a Drupal site using oembed. This is related to the “https://oembed.com/providers.json” file returning a 200 (i.e. so it passes checks), but returning bad file contents via curl:

$ curl "https://oembed.com/providers.json" <br /> <b>Fatal error</b>: Uncaught Error: Call to undefined function yaml_parse_file() in /var/www/html/oembed.com/www/json.php:14 Stack trace: #0 {main} thrown in <b>/var/www/html/oembed.com/www/json.php</b> on line <b>14</b><br />

$ php -r "var_dump(file_get_contents('https://oembed.com/providers.json'));" string(237) "<br /> <b>Fatal error</b>: Uncaught Error: Call to undefined function yaml_parse_file() in /var/www/html/oembed.com/www/json.php:14 Stack trace: #0 {main} thrown in <b>/var/www/html/oembed.com/www/json.php</b> on line <b>14</b><br />

It seems to work fine via a browser or with the Accept-Encoding header.

Potential resolution is to create a local copy of providers.json and serve it from local disk until oembed resolve the issue. We also suspect this could be a regional issue with a Cloudfront edge node having cached a bad copy of the endpoint (We’re in AU region) as other regions seem to not have this issue.

Cheers,