Author Topic: Wxadvisory.php error fetching or reading data  (Read 2254 times)

0 Members and 1 Guest are viewing this topic.

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Wxadvisory.php error fetching or reading data
« on: March 31, 2014, 02:44:36 PM »
When I access my wxadvisory.php page, I get an error message that says: Advisory Information Unavailable, error fetching or reading data from the NOAA advisories server. Does anyone have any suggestions? http://monmouthcountyweather.com/weather/advisories/wxadvisory.php
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #1 on: March 31, 2014, 03:26:27 PM »
Are you running the latest version of the advisory scripts? There was a change made by Ken back on March 15th.
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #2 on: March 31, 2014, 03:37:09 PM »
I downloaded the version from Saratoga-weather.org, which says it was last updated Nov 2011. I guess I have to find the newest version now.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline W3DRM

  • Forecaster
  • *****
  • Posts: 3360
    • Emmett Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #3 on: March 31, 2014, 04:13:00 PM »
I see a new "advforecast2.php" file with a date of 3-17-2014 on it. That was the date I uploaded the new file I had downloaded from Ken's Saratoga Weather site. That file contains the following version notes:

//  Version 3.11 - 13-Mar-2014 - fixed point forecast text non-display due to NWS website changes
//  Version 3.12 - 15-Mar-2014 - fixes for Zone forecast, warnings and auto-correct old URLs
//
$Version = 'advforecast2.php (multi) - V3.12 - 15-Mar-2014';
//


I seem to remember having URL problems which resulted in the advisories not being displayed.

Looking further at Ken's website, it appears this change impacted Base-USA templates so I don't know whether it is applicable to your site or not.
« Last Edit: March 31, 2014, 04:17:48 PM by W3DRM »
Don - W3DRM - Emmett, Idaho --- Blitzortung ID: 808 --- FlightRadar24 ID: F-KBOI7
Davis Wireless VP2, WD 10.37s150,
StartWatch, VirtualVP, VPLive, Win10 Pro
--- Logitech HD Pro C920 webcam (off-line)
--- RIPE Atlas Probe - 32849

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #4 on: March 31, 2014, 04:17:17 PM »
I downloaded the advforecast2 page today. The problem I'm having is with the Advisories page, not forecast.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #5 on: April 03, 2014, 11:54:06 AM »
Anyone? I'd like to get this fixed, if the problem is on my end.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wxadvisory.php error fetching or reading data
« Reply #6 on: April 03, 2014, 12:25:11 PM »
Since you've modified the atom-advisory.php script (or hidden it behind your wxadvisory.php page), I can't remotely diagnose what is happening.  Please post the source of the page (and the atom-advisory.php you're using) in order to see what's going on.

I tested the NJZ013 zone with my (unmodified) script, and it returns
Quote
There are no active watches, warnings or advisories for Western Monmouth (New Jersey).


Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #7 on: April 03, 2014, 12:38:50 PM »
Attached is the atom-advisory page (only modifications were renaming it to wxadvisory.php and adding the dropdown menu). I have tried it both with and without the dropdown menu, and have gotten the error both times. I changed the file to .txt, so that I can upload it here.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wxadvisory.php error fetching or reading data
« Reply #8 on: April 03, 2014, 01:41:40 PM »
There is something strange going on .. I see the changes you made to the source, but that wouldn't change how it works (or doesn't work at present).

I ran my script with ?cache=refresh to force a cache reload and the view-source of the page showed the expected
Quote
<!-- atom-advisory.php - atom-advisory.php - V2.09 05-Nov-2011 -->
<!-- getting new file from http://alerts.weather.gov/cap/wwaatmget.php?x=NJZ013 -->
<!-- CURL GET /cap/wwaatmget.php?x=NJZ013 HTTP/1.1 Host: alerts.weather.gov -->
<!-- Time to fetch: 0.266 sec -->
<!-- cache saved to ./atom-advisory-NJZ013.txt -->
<p>There are no active watches, warnings or advisories for Western Monmouth (New Jersey).</p><!-- zone=NJZ013 -->
 
Doing the same with your script on your server returns just
Quote
If no warnings are listed, try selecting "Monmouth County" or "Ocean County".<p>Advisory Information Unavailable, error fetching or reading data from the <a href="http://alerts.weather.gov/cap/wwaatmget.php?x=NJZ013">NOAA advisories server.</a></p>
<!-- zone=NJZ013 -->
with none of the other debug stuff.

Trying your code on my server with ?cache=refresh shows
Quote
<!-- wxadvisory-johnn.php - atom-advisory.php - V2.09 05-Nov-2011 -->
<!-- getting new file from http://alerts.weather.gov/cap/wwaatmget.php?x=NJZ013 -->
<!-- CURL GET /cap/wwaatmget.php?x=NJZ013 HTTP/1.1 Host: alerts.weather.gov -->
<!-- Time to fetch: 0.276 sec -->
<!-- cache saved to ./atom-advisory-NJZ013.txt -->
<p>There are no active watches, warnings or advisories for Western Monmouth (New Jersey).</p><!-- zone=NJZ013 -->

So I'm suspecting that the problem is with cURL on your webserver (either not installed, or not configured to allow HTTP access).

You can change the line
Code: [Select]
   if (!function_exists('curl_init')) {
to
Code: [Select]
   if (true or !function_exists('curl_init')) {
to force the script to use the built-in function to retrieve the data (and not use cURL).

See if that works for you...

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #9 on: April 03, 2014, 05:39:16 PM »
I'll try the change, if I can ever get access to my website again... Every time I try to connect, my FTP client has been timing out. Maybe one of these days I'll upgrade to a better host.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: Wxadvisory.php error fetching or reading data
« Reply #10 on: April 26, 2014, 02:14:26 PM »
I finally got around to making the change, but it is still giving me the same error. I'll upload the current file here.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

 

anything