nerdbaggy / StatusPage

Public Status Page for UptimeRobot
http://projects.spencerl.com/statuspage/
MIT License
240 stars 61 forks source link

No Data and PHP Errors #35

Closed LeeThompson closed 8 years ago

LeeThompson commented 8 years ago

PHP v5.5.23

[15-Oct-2015 20:05:27 UTC] PHP Warning: Invalid argument supplied for foreach() in D:\Pub\HTTPD\APPS\statuspage\statuspage\statusPage.php on line 49 [15-Oct-2015 20:05:27 UTC] PHP Warning: Invalid argument supplied for foreach() in D:\Pub\HTTPD\APPS\statuspage\statuspage\statusPage.php on line 23

LeeThompson commented 8 years ago

The probelm is CURL is returning CURLE_SSL_CACERT had to make this change to statusPage.php

change:

    curl_setopt_array($curl, array(
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_URL => $url,
        CURLOPT_USERAGENT => 'UptimeRobot Public Status Page',
        CURLOPT_CONNECTTIMEOUT => 10
        ));

to:

    curl_setopt_array($curl, array(
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_URL => $url,
        CURLOPT_USERAGENT => 'UptimeRobot Public Status Page',
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_SSL_VERIFYPEER => false
        ));
nerdbaggy commented 8 years ago

Thanks! Glad you got it working