Page 1 of 1

No WU Weather Forecast on website

Posted: Sat 01 Jul 2017 10:25 pm
by Mark14
For a quite long time I have no working forecast from the Weather Underground on my website. I updated WU-forecast.php file and inserted an API key. Yet I still have no data from WU.
How to solve the issue?

Website link: http://slesinpogoda.cba.pl/wxindex.php?lang=en#

Re: No WU Weather Forecast on website

Posted: Sat 01 Jul 2017 10:55 pm
by saratogaWX
That is strange.

When I do view-source:http://slesinpogoda.cba.pl/wxforecast.php?force=1 it shows
<!-- WU-forecast.php (ML) Version 3.03 - 22-Feb-2017 on PHP 5.3.29 -->
<!-- temps in C -->
<!-- autoSetTemplate using wide aspect. -->
<!-- WU_API Raw URL='http://www.wunderground.com/cgi-bin/fin ... 00.2.12345' -->
<!-- WU API New URL='http://api.wunderground.com/api/664f9a4 ... 12345.json' -->
<!-- loading from https://api.wunderground.com/api/664f9a ... 12345.json. -->
<!-- curl fetching 'https://api.wunderground.com/api/664f9a ... 12345.json' -->
<!-- HTTP stats: RC= dest=
Times: dns=0.000 conn=0.000 pxfer=0.000 total=0.000 secs -->
<!-- headers:

-->
<!-- RC=, bytes=0 -->
<!-- saved cache to ./cache/WU-forecast-json-0-en.txt (0 bytes) -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' doIconv='1' doRTL='' -->
<!-- processing JSON entries for forecast -->
<!-- rawJSON size is 0 bytes -->
<!-- WU_prepareJSON: Success. Valid UTF-8. -->
<!-- json_decode returns - No errors -->
I tried both URLs in the browser (the raw and API url) and both worked fine.

The line:

Times: dns=0.000 conn=0.000 pxfer=0.000 total=0.000 secs

is suspicious.. it looks like cUrl on your webserver is not working correctly.

I tried running check-fetch-times.php to see if other curl load is also working/broken and saw a series of Warning: messages
about all the curl functions saying "curl_{function}() has been disabled for security reasons"

You'll need to contact the tech support for your webhost and get them to enable curl functions for your site to work correctly.

Re: No WU Weather Forecast on website

Posted: Sun 02 Jul 2017 12:46 pm
by Mark14
Unfortunately, cURL is turned off on free accounts of my webserver... :cry:

Re: No WU Weather Forecast on website

Posted: Sun 02 Jul 2017 3:18 pm
by saratogaWX
Ahh... you'll need to either pay, or find another hoster that allows curl for free. The scripts in the template use external resources (WU, temis.nl) for data, so without curl, your site will not be fully functional.