Problems with wx advisories on my page

I have been unable to get the atom/cap warnings to work on my page for the last month. It has been working fine for a good while. I am using the 2.08 version of atom-top-warning.php which I believe is the latest. I am using the carter lake template.
When I run the check-fetch-times.php script, I receive the following:

–checking NWS Warning Zone ATOM/CAP Feed –
URL: http://alerts.weather.gov/cap/wwaatmget.php?x=VAC119
GET /cap/wwaatmget.php?x=VAC119 HTTP/1.1
Host: alerts.weather.gov Port: 80 IP=204.227.127.211
Network error: Connection timed out (110)
HTTP stats: dns=0.001 conn=2.002 put=n/a get( blocks)=n/a close=n/a total=2.003 secs
fetch function elapsed= 2 secs.
RC=, bytes=0

Headers returned:


–end NWS Warning Zone ATOM/CAP Feed check –

It shows that it is not connecting but if I use the above url, it works fine. Thanks for any help with this…

It’s a problem with your web server itself … it can’t connect to alerts.weather.gov to get the data. Contact the technical support for your hosting provider and have them address the issue.

BTW… thanks for using the check-fetch-times.php utility – that diagnostic run is just what was needed to show the source of the problem :slight_smile:

Best regards,
Ken

Thanks for the solution…and sorry for posting in the wrong place originally. :oops:

Looks like atom-top-warning.php stopped working today. It’s not working on my site, and Ken’s demo site is showing the same thing, error fetching or reading data from server, so I know it’s not just me. The URL it points to is still working fine.

It’s them…(NOAA)

Top Warning Information Unavailable, error fetching or reading data from the NOAA advisories server.

They’re returning ‘n/a’ as the response. The problem is they’ve switched to HTTPS only and use a 301 redirect

HTTP/1.1 301 Moved Permanently
Server: AkamaiGHost
Content-Length: 0
Location: Current Watches, Warnings and Advisories for Santa Clara Valley Including San Jose (CAZ513) California Issued by the National Weather Service
Date: Tue, 14 Jun 2016 21:49:24 GMT
Connection: close
to force it.

I think we missed the memo about them converting to HTTPS only operation :frowning:

I’ll work out a fix with cUrl or let PHP handle it with file_get_contents().

Almost exactly a year ago :lol:

Thanks Ken. By the way, I work for “them”, and as with most things government-related, change comes slowly. I’m still mystified why it’s taking us so long to switch all products to mixed case from upper case. We have requirements that we have to give public notice something like 90 days before a change is made. But as far as I can tell, changing from upper case to mixed case shouldn’t really break anything. Things that make you go, “Hmmmm”.

D’Oh… my own posting about it. The memory must be only short term now . Thanks for being gentle, Niko #-o :oops:

I never thought that they’d switch plain-old-RSS to HTTPS-only … seems like it will break a bunch of simple/useful things, but Oh Well…

I’ll be posting updates to atom-advisory.php and atom-top-warning.php to force https access (even if the url is http) to alerts.weather.gov.

The alerts.weather.gov website switched to using HTTPS only on 14-Jun-2016.

This means that three scripts have changed to support the https:// access for the ATOM/CAP advisories.

atom-advisory.php V2.11
atom-top-warning V2.09

are now available for standalone use at http://saratoga-weather.org/scripts-atom.php

Those two, and nws-alerts.php V2.16 are included in the Saratoga template for Base-USA users.

Use the update tool for Base-USA, Plugin-* 14-Jun-2016

p.s. If you haven’t updated since mid-May-2016, You should use 23-May-2016 for the query to get the updated get-metar-conditions-inc.php script since the website used by the old script for METAR data is being shut down 15-Jun-2016… you’ve been cautioned :slight_smile:

I’m glad someone posted about this. I spent a few minutes this morning trying to determine why my advisories feed magically stopped working. Turns out I had to edit the script to use https:// instead, as indicated above.

Nonetheless, I’m glad that the NWS is switching over to SSL!

Well foolish me… was reading the forum yesterday and never saw this… so my alerts quit working just when we had major T-Storms drop in on us… Well that got quickly resolved. Thanks Ken.

Yes, it was sudden… they changed yesterday (14-Jun-2016) from serving alerts.weather.gov http request normally to a 301-Moved Permanently redirect to the same URL, but with https:// … sigh. I wish they had put a notice on the site saying this was going to happen on a specific date. Instead, they made the switch at Akamai, and my, Curly’s, Wim’s, Jachym’s scripts for alerts all broke at the same time.

I had more to fix with atom-advisory and atom-top-warning. Curly’s nws-alerts had a 1-line change (2 lines if you are on a host with funky SSL config). Wim and Jachym were already using cURL, so their changes were likely minor.

As they (NWS) move through their sites with the mandated HTTPS conversion, I hope they’ll have better notification…

I could not agree more…

I successfully made the conversion - none too soon. I do have one issue with the “new” script and I am certain it is a setting someplace I missed in my haste to get it operational.

I had, in the previous version, my alerts showing as (example):

SEVERE THUNDERSTORM WARNING
Carroll County - Benton County

SEVERE THUNDERSTORM WATCH
Madison County - Weakley County…

Now it displays as:
SEVERE THUNDERSTORM WARNING - Carroll County - Benton County
SEVERE THUNDERSTORM WATCH - Madison County - Weakley County…

I would like it to go back to that original (1st) layout. What setting did I overlook? Keep in mind I implemented this while under the gun… seriously - with Severe T-Storms, all over the place and in addition to my Weather Watching duties for the NWS I had to do this really, really quickly. Things have settled down for now weather wise… but in my quick haste I uploaded over top the original files and now cannot recall the settings.

If you address them all as https, would the unconverted ones serve the http data by default?

To my knowledge, the unconverted ones will fail and you will get nothing… no data whatsoever. At least that is what brought it to my attention today.

Thanks :slight_smile: It was just a thought…

Hi, I’m just getting caught up with this. I am using the v3 USA template with Weather Display and have updated the atom-advisory.php, atom-top-warning.php, get-meter-conditions-inc.php and nws-alerts.php. Following the updated I am getting a parse error on my wxadvisory.php page, cannot track it down. I was hoping Ken or someone may have a suggestion on what I may have done incorrectly. Possibly I have missed some previous updates that may be needed.

Thanks,
Paul


Screen Shot 2016-06-25 at 7.36.03 AM.png

Hi Paul,

Ken has suggested that PHP version may be the source of this type proplem on another forum…
http://www.wxforum.net/index.php?PHPSESSID=fa8d10c69b3a7718c7c119f53dc67d3f&topic=29656.msg291608#msg291608

Hope this helps,
Gus

Thanks Gus! That was the issue. Even though my web host cpanel indicated I was using 5.4, the indication really meant that 5.4 was available to use. I made the switch from 5.2 to 5.4 and now the advisory works again.

I did have some fallout from the change however, I am getting a couple of error messages, attached. I’ll see if I can figure out the issue. I also maintain a second site which is still using Saratoga v2 templates and there are additional errors there. I’ll need to finally get that site on to v3, held off as long as I could :-).

Thanks again,
Paul


If you search the forum, someone made 3 new files for the who’s online script to fix those errors.