Author Topic: River Levels Page No Longer Loading  (Read 1409 times)

0 Members and 1 Guest are viewing this topic.

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1985
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
River Levels Page No Longer Loading
« on: March 21, 2018, 12:14:18 PM »
Are other people having a problem with the river page not loading?  I get a error that says:
[20-Mar-2018 22:28:13 America/Chicago] PHP Fatal error:  Call to a member function attributes() on null in /home/stillwat/public_html/wx/wxriverdetail.php on line 95

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline rrrick8

  • Contributor
  • ***
  • Posts: 138
    • Vermilion weather
Re: River Levels Page No Longer Loading
« Reply #1 on: March 21, 2018, 03:58:25 PM »
Yes, my details are not loading either.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 519
    • Lake Huron Weather
Re: River Levels Page No Longer Loading
« Reply #2 on: March 21, 2018, 05:28:57 PM »
Mine is not working either, it was working just about 3 days ago.

Davis Vantage Pro2, Serial Data Logger
WD 10.37S-(b60), VWS V15.00p03, Weatherlink 6.0.3,  Fling 2.35, Broadwave 2.0, Win 7 Pro 64Bit
KMICHEBO10 - CW3699 - Cheboygan, MI

Offline Forever

  • Contributor
  • ***
  • Posts: 127
Re: River Levels Page No Longer Loading
« Reply #3 on: March 21, 2018, 06:08:33 PM »
It looks like the script is no longer downloading the needed data, all of the txt files are empty.

Offline rrrick8

  • Contributor
  • ***
  • Posts: 138
    • Vermilion weather
Re: River Levels Page No Longer Loading
« Reply #4 on: March 21, 2018, 06:16:10 PM »
I notice that it is working on Dennis's (the creator's) website... http://eastmasonvilleweather.com/wxriverpage.php.
I'll send him a notice and link to this discussion to see if he knows that it has stopped for us.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline EastMasonvilleWX

  • Member
  • *
  • Posts: 23
    • East Masonville Weather
Re: River Levels Page No Longer Loading
« Reply #5 on: March 21, 2018, 07:17:58 PM »
Hey Guys,

Pretty easy fix, need to make the data location a https. Execute as below. It will be found in the river-fetch.php in the River folder.

Currently:
Code: [Select]
$ch = curl_init("https://water.weather.gov/ahps2/hydrograph_to_xml.php?gage=$riverid&output=xml");
Updated:
Code: [Select]
$ch = curl_init("http://water.weather.gov/ahps2/hydrograph_to_xml.php?gage=$riverid&output=xml");
I have attached an updated file. Change the extension to .php.

Should fix your issues, I will work on updating my site this weekend.

Thanks,
-Dennis
East Masonville Weather
Upstate New York
http://eastmasonvilleweather.com


Offline rrrick8

  • Contributor
  • ***
  • Posts: 138
    • Vermilion weather
Re: River Levels Page No Longer Loading
« Reply #6 on: March 21, 2018, 07:25:32 PM »
Figures.  :oops:
I changed the http to https in about 6-7 different places of the script but forgot about the fetch.php
Should have figured that out with it being the Cron job for the script.
 ](*,) ](*,) ](*,)

Thanks Dennis.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 519
    • Lake Huron Weather
Re: River Levels Page No Longer Loading
« Reply #7 on: March 22, 2018, 06:48:18 AM »
I did the same thing and missed the same one  ](*,)

Thanks for the fix Dennis.


Figures.  :oops:
I changed the http to https in about 6-7 different places of the script but forgot about the fetch.php
Should have figured that out with it being the Cron job for the script.
 ](*,) ](*,) ](*,)

Thanks Dennis.

Davis Vantage Pro2, Serial Data Logger
WD 10.37S-(b60), VWS V15.00p03, Weatherlink 6.0.3,  Fling 2.35, Broadwave 2.0, Win 7 Pro 64Bit
KMICHEBO10 - CW3699 - Cheboygan, MI

Offline vomaretired

  • Member
  • *
  • Posts: 3
Re: River Levels Page No Longer Loading
« Reply #8 on: March 22, 2018, 03:15:31 PM »
Mine stopped working recently too but found by using the code on line 39:

//    if the curl does not work
   $html = implode(" ", file("http://water.weather.gov/ahps2/hydrograph_to_xml.php?gage=$riverid&output=xml"));
   $fp = fopen("river-$riverid.txt", "w");
   if ($fp) {
   $write = fputs($fp, $html);
   fclose($fp);
   }
}
Instead of using fetch I started using the code above and it worked again. Never thought of the https being the problem but knew someone would come up with a fix. Thanks for the update Dennis.

Offline tmabell

  • Senior Contributor
  • ****
  • Posts: 233
Re: River Levels Page No Longer Loading
« Reply #9 on: March 22, 2018, 03:38:20 PM »
Thanks Dennis.  Out of curiosity is there a chance that you might have the entire script available?  I am running a rather old version and would like to get current.

Offline rrrick8

  • Contributor
  • ***
  • Posts: 138
    • Vermilion weather
Re: River Levels Page No Longer Loading
« Reply #10 on: March 22, 2018, 03:49:58 PM »
Thanks Dennis.  Out of curiosity is there a chance that you might have the entire script available?  I am running a rather old version and would like to get current.
I'm mobile and don't have it with me but I believe it's available on his website. Just follow the link through his signature and it's in the menu on the far right tab I believe

Sent from my SAMSUNG-SM-G928A using Tapatalk

Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline tmabell

  • Senior Contributor
  • ****
  • Posts: 233
Re: River Levels Page No Longer Loading
« Reply #11 on: March 22, 2018, 03:55:54 PM »
Got it, thanks!

Offline tmabell

  • Senior Contributor
  • ****
  • Posts: 233
Re: River Levels Page No Longer Loading
« Reply #12 on: March 22, 2018, 04:38:21 PM »
Can anyone who is using PHP version 7.2 confirm that this script is working for them?

Offline tbrasel

  • Contributor
  • ***
  • Posts: 133
    • Northwest Arkansas Weather.com
Re: River Levels Page No Longer Loading
« Reply #13 on: March 24, 2018, 09:31:09 AM »
Can anyone who is using PHP version 7.2 confirm that this script is working for them?

Yes it works, if I am referencing the same script.

Although, after I updated from PHP 7.1, to 7.2, A Warning: simplexml_load_file(): appeared. This warning was quickly resolved however.
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline tmabell

  • Senior Contributor
  • ****
  • Posts: 233
Re: River Levels Page No Longer Loading
« Reply #14 on: March 24, 2018, 09:57:37 AM »
I see that on your page as of just now.  I'll bet that if you look at your server's error logs you'll see dozens upon dozens of PHP warnings and notices.  With a little help from a friend, I was able to circumvent enough of those to get it to work and at that point I gave up and turned error reporting off.

Offline tbrasel

  • Contributor
  • ***
  • Posts: 133
    • Northwest Arkansas Weather.com
Re: River Levels Page No Longer Loading
« Reply #15 on: March 24, 2018, 10:23:41 AM »
Nothing is showing in my error log, currently.
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1156
  • unnamed weather station, Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: River Levels Page No Longer Loading
« Reply #16 on: March 26, 2018, 09:34:12 PM »
Missing something on my http://tiggrweather.net/wxriverpage.php. Map and headers show but not the table listing. Cron appears to have run once (sorta) but possibly not completely. Server returned...
Code: [Select]
0 Gauges Near Flood Stage</br>0 Gauges with Minor Flooding</br>0 Gauges with Moderate Flooding</br>0 Gauges with Major Flooding</br>0 Gauges in Action or above</br>Last Update: Monday March 26th, 2018 12:16 PM MST</br>Next Update: Monday March 26th, 2018 04:13 PM MST...at 1216 today but then nothing else.

Thanks.
John
W7JKG
BUY FROM AMAZON  HERE... Thank You! :-)

Offline rrrick8

  • Contributor
  • ***
  • Posts: 138
    • Vermilion weather
Re: River Levels Page No Longer Loading
« Reply #17 on: March 26, 2018, 09:37:40 PM »
Missing something on my http://tiggrweather.net/wxriverpage.php. Map and headers show but not the table listing. Cron appears to have run once (sorta) but possibly not completely. Server returned...
Code: [Select]
0 Gauges Near Flood Stage</br>0 Gauges with Minor Flooding</br>0 Gauges with Moderate Flooding</br>0 Gauges with Major Flooding</br>0 Gauges in Action or above</br>Last Update: Monday March 26th, 2018 12:16 PM MST</br>Next Update: Monday March 26th, 2018 04:13 PM MST...at 1216 today but then nothing else.

Thanks.

Did you apply the fix Dennis posted above?
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1156
  • unnamed weather station, Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: River Levels Page No Longer Loading
« Reply #18 on: March 26, 2018, 09:39:41 PM »
Did you apply the fix Dennis posted above?
Yes. Actually downloaded the script he posted.

Thanks.
John
W7JKG
BUY FROM AMAZON  HERE... Thank You! :-)

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1156
  • unnamed weather station, Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: River Levels Page No Longer Loading
« Reply #19 on: March 26, 2018, 11:31:49 PM »
Got it. Mine needed $riverstodisable= "0" rather than the default (apparently) 1 setting. Now working.
John
W7JKG
BUY FROM AMAZON  HERE... Thank You! :-)

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1156
  • unnamed weather station, Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: River Levels Page No Longer Loading
« Reply #20 on: March 27, 2018, 09:32:09 PM »
I gave up. Cron ran once Mon night but no more since then.

Thanks anyway, guys.
John
W7JKG
BUY FROM AMAZON  HERE... Thank You! :-)

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 307
    • Indian Trail Weather
Re: River Levels Page No Longer Loading
« Reply #21 on: March 27, 2018, 11:57:58 PM »
I updated "river-fetch.php"  from Dennis's new file but no go. What else has to be edited?

Thanks.
« Last Edit: March 28, 2018, 12:18:02 AM by Breezy »
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline Bunty

  • Forecaster
  • *****
  • Posts: 1985
  • Home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: River Levels Page No Longer Loading
« Reply #22 on: March 28, 2018, 01:32:28 PM »
Mine is working but lacks the rising.gif.
https://stillwaterweather.com/wx/wxriverpage.php

Also the 2nd home page using modified AltDashboard 6.81 at http://stillwaterweather.com/wx/2ndhome.php

Offline tmabell

  • Senior Contributor
  • ****
  • Posts: 233
Re: River Levels Page No Longer Loading
« Reply #23 on: March 28, 2018, 01:43:48 PM »
In my River-Config.php I have this:

Code: [Select]
$arrowfolder = "/ajax-images"; // The folder where the arrows are located.
In /ajax-images  I have three images... rising.gif, falling.gif and steady.gif.  These are the arrows.

Check your settings and for the presence of those three images.

Offline vomaretired

  • Member
  • *
  • Posts: 3
Re: River Levels Page No Longer Loading
« Reply #24 on: March 28, 2018, 03:23:18 PM »
If Cron isn't working create a download of the river-fetch.php every few hours with your Weather Display software. I have mine to download the file every four hours by using the 'HTTP Download' portion of FTP/Internet Setup and is working fine.