Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

No WU Weather Forecast on website

Discussion of Ken True's web site templates

Moderator: saratogaWX

Mark14
Posts: 48
Joined: Thu Aug 23, 2012 8:53 pm
Weather Station: WH 2080
Operating System: Windows 7
Location: Konin, Poland

No WU Weather Forecast on website

Postby Mark14 » Sat Jul 01, 2017 10:25 pm

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#

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: No WU Weather Forecast on website

Postby saratogaWX » Sat Jul 01, 2017 10:55 pm

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/findweather/getForecast?query=zmw:00000.2.12345' -->
<!-- WU API New URL='http://api.wunderground.com/api/664f9a4756a92341/forecast10day/geolookup/lang:EN/q/zmw:00000.2.12345.json' -->
<!-- loading from https://api.wunderground.com/api/664f9a ... 12345.json. -->
<!-- curl fetching 'https://api.wunderground.com/api/664f9a4756a92341/forecast10day/geolookup/lang:EN/q/zmw:00000.2.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.

Mark14
Posts: 48
Joined: Thu Aug 23, 2012 8:53 pm
Weather Station: WH 2080
Operating System: Windows 7
Location: Konin, Poland

Re: No WU Weather Forecast on website

Postby Mark14 » Sun Jul 02, 2017 12:46 pm

Unfortunately, cURL is turned off on free accounts of my webserver... :cry:

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: No WU Weather Forecast on website

Postby saratogaWX » Sun Jul 02, 2017 3:18 pm

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.


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 2 guests