Getting Internal Server Error on cURL (php)

Hi there!

Since today I am unable to get the Estimote beacons. It did work for weeks, but suddenly I’m getting an Internal Server Error as result given back from my request. The strange thing is, when I use the ‘curl’ command in terminal, it does work.

The testcode I’m using;

<?php

    DEFINE ("API_URL", "https://cloud.estimote.com");
    DEFINE ("API_URL_DEVICES", "https://cloud.estimote.com/v2/devices");
    DEFINE ("API_ID", "_abc-123_");
    DEFINE ("API_TOKEN", "_abcdef1234567890_");

    $beacon = curl_init ();

    curl_setopt ($beacon, CURLOPT_URL, API_URL_DEVICES);
    curl_setopt ($beacon, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($beacon, CURLOPT_CUSTOMREQUEST, "GET");

    curl_setopt ($beacon, CURLOPT_USERPWD, API_ID . ":" . API_TOKEN);

    $headers = array();
    $headers[] = "Accept: application/json";
    curl_setopt ($beacon, CURLOPT_HTTPHEADER, $headers);

    $result = curl_exec ($beacon);
    if (curl_errno ($beacon)) {
        echo "\033[31m ERROR \033[0m \n:" . curl_error ($beacon);
    } else {
        header ('Content-Type: application/json');
        echo ($result);
    }
    curl_close ($beacon);
    ?>

Additional information

  • I’m using a Comodo RSA Extended SSL Certificate valid untill februari 1st 2017
  • Both PHP 7.x and 5.6.x are not giving the expected results anymore
  • Problem occures in the clients’ dashboard on any request to the Estimote API.
  • All server certificates (including CA / Root) have been updated
  • cURL v7.43.0
  • cURL has SSL enabled

Any ideas or suggestions?

Thanks for any reply.

Frank