Author Topic: Rain Not updating in realtime & error  (Read 3014 times)

0 Members and 1 Guest are viewing this topic.

Offline HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #25 on: February 16, 2023, 05:39:36 PM »
www.hamiltonwx.com [Thu Feb 16 08:35:48 2023] [error] [pid 20786] apache2_util.c(273): [client 114.119.156.33:33874] [client 114.119.156.33] ModSecurity: Access denied with code 412 (phase 2). Pattern match "PetalBot" at REQUEST_HEADERS:User-Agent. [file "/apache/conf/includes/mod_security2.conf"] [line "453"] [id "425"] [hostname "hamiltonwx.com"] [uri "/wxhistory.php"] [unique_id "Y-4xNMTFlIIN2n1LP9HfpAAAEPk"]
www.hamiltonwx.com [Thu Feb 16 08:41:29 2023] [error] [pid 62226] apache2_util.c(273): [client 114.119.150.186:34256] [client 114.119.150.186] ModSecurity: Access denied with code 412 (phase 2). Pattern match "PetalBot" at REQUEST_HEADERS:User-Agent. [file "/apache/conf/includes/mod_security2.conf"] [line "453"] [id "425"] [hostname "hamiltonwx.com"] [uri "/ajax-images/moon22.gif"] [unique_id "Y-4yiaB-YOqA5Ph7_xFRCgAABS8"]
www.hamiltonwx.com [Thu Feb 16 17:14:10 2023] [error] [pid 46505] mod_cgid.c(1080): [client 190.145.68.131:55626] AH01264: script not found or unable to stat: /home/hamilton/www/www/wp-login.php

I also get a blank page (no errors) with Murray's wxnoaarecords.php

and get a scrolling error for about 30 lines in wxnoaaclimatereports.php that says:

Warning: Undefined variable $year in /home/hamilton/www/www/include-NOAA-reports.php on line 254

Once i switch back to version 7.4, the error goes away and Murray's page shows up.

Let me know if you want me to set it at version 8.0 and you can go and see what I mean.
« Last Edit: February 16, 2023, 05:42:56 PM by HamiltonNJWX »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #26 on: February 16, 2023, 06:00:06 PM »
So the three error_log entries you posted were:
2 entries for a Bot that was denied access to your site by mod_security .. not an update issue.
1 entry for another bot looking for a non-existent page (wp-login.php) .. not an update issue

Murray's wxnoaarecords.php is old code .. likely needs replacement of all ${varname} with {$varname) form and maybe some other errors too.  It's not one of the scripts I distribute (or maintain) from my legacy-scripts area.  I think there may be fixes available .. do a forum search here and on weather-watch.com.

The include-NOAA-reports.php is not a core script on Weather-Display.  The wxnoaaclimatereports.php using that include was likely made for Weather-Display by someone else (Beteljuice?) using some of my NOAA reports scripts I do support for WeatherLink,Cumulus/CumulusMX, and weewx, but not for Weather-Display.
Problems with any of the scripts showing in check-fetch-times.php?show=versions I do fully support .. third-party add-on scripts should be supported by their respective authors.
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 HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #27 on: February 16, 2023, 06:02:16 PM »
Thanks, Ken. Would this be contributing to the wind rose not updating and live rain not updating unless you do a refresh?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #28 on: February 16, 2023, 06:37:25 PM »
Are you talking about the wind direction indicator in the second column, first row of the alternative dashboard?  If so, yes, it should be updating as wind direction changes.  Right now you're showing Calm (no direction as no current wind).  The two rain displays (second column, first row, and second column, second row) for Rain/Today should update with ajaxWDwx3.js.  Since it doesn't appear to be raining at your location (no recent bucket tip), can't tell why.

I took a look at your include-NOAA-reports.php (marked as V2.07), but.. my current (non-WD version) being distributed is Version 2.08 - 27-Dec-2022
I do see why PHP 8 gripes about your copy.. the ${variable} all have to be changed to {$variable} syntax as the former syntax was deprecated in PHP 8.1 and removed in PHP 8.2.  Sigh.

I've attached a copy of the include-NOAA-reports.php (your version) fixed for PHP 8 (I think).  Give it a try.

As for the error message about $year, it may just be your noaareportyear$yr.htm file is missing on your site ?!?

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 HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #29 on: February 17, 2023, 08:31:43 AM »
Hey, Ken. Just a follow up.... I still had the errors on the reports after your file was updated. Thank you so much for the work you do.  I ditched the alt dashboard and went back to yours and it works fine.  This morning with it raining, the totals didnt match the vp console readings even AFTER a refresh. Installed yours back in and wind rose and rain updating realtime.

I will wait to see if anyone else reports anything and maybe try the alt dashboard at a later time.

Thanks again

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #30 on: February 18, 2023, 01:28:38 PM »
I've had some time to retrofit support for OWM, PW, VC forecasts into the ajax-dashboard6.php.  I also discovered the issue with rain display not updating (was a missing span tag and two instances of id="ajaxrain") .. Fixed in 6.95g update (and an update to ajaxWDwx3.js JavaScript).  I've attached the two for you to try out.
« Last Edit: February 18, 2023, 04:31:55 PM by saratogaWX »
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 HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #31 on: February 18, 2023, 01:55:48 PM »
You rock, Ken!  Gonna do a bucket tip to test. is there any direction i can look to for the wind direction not changing? I printed out both of the files (old and new) to check the changes you have made. Thank you so much for your assistance. Will let you know about the rain results.


 

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #32 on: February 18, 2023, 04:34:33 PM »
Argggh... looks like a 'fix' I'd put in to 6.95e for wind was in error.  Now corrected.  Use both 6.95g ajaxWDwx3.js and ajax-dashboard6.php from the new 6.95g distribution in the legacy scripts area or the updated ones attached.  Now both Rain and Wind update as expected.
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 hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #33 on: February 19, 2023, 02:48:34 PM »
Hi Ken put the latest altdashboard on https://www.hc-iom.co.uk/WD-AJAX3/index.php give one or two error for me although they disappear if display error is set to 0 as https://www.hc-iom.co.uk/WD-AJAX1/index.php but the day/night record just show &deg C no info and will relate to the error on line 3071
not sure about the error on line 2389 to do with rain differance
these two links are using php 8.0.26
the other thing i noticed when comparing the old and new for my settings was that the ($ on the image dir lines in the old version have reverted back to $(  in the new one
the tide error are not an issue

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #34 on: February 19, 2023, 04:27:13 PM »
@hcorrin, I haven't debugged the Tides section (since I'm inland and don't use it) but will try with your tides file and settings.

Regarding the 2 warnings at 547/548, that looks like a string->float issue.  I'll try explicitly declaring that.

I just checked the 6.95g ajax-dashboard6.php and it has all the {$variable} syntax for images.  The old one was the one with ${variable} syntax, AFIK.
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 hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #35 on: February 19, 2023, 06:15:18 PM »
strange
the attached is the original file i downloaded earlier this evening my time before my changes, hence my query or am i not thinking correctly i have amended my working copies please correct me if i have got it wrong

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #36 on: February 20, 2023, 10:59:58 AM »
Nope, I have it wrong.. thanks for spotting the issue.  I've installed wxtide32 in WD (and found the ancient ./tides/ set of images) and will be releasing 6.95h with the fixed ${variable} notations too.  THANK YOU!
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #37 on: February 20, 2023, 11:39:43 AM »
Ok.. think I've fixed the tides issue and all the prior ${variable} ones.  Try this please.
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #38 on: February 20, 2023, 03:57:03 PM »
@hcorrin, looks like the tide display is now fixed on https://www.hc-iom.co.uk/WD-AJAX1/index.php

The other notifications are all due to your testtags.php including units in the measurements.
Change WD, Control Panel, WebFiles/Webpage, Custom webpage:
untick 'include the Units used'

That should fix the remaining issues.
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 Vasco

  • Forecaster
  • *****
  • Posts: 342
    • PWS
Re: Rain Not updating in realtime & error
« Reply #39 on: February 20, 2023, 04:35:16 PM »
@hcorrin, looks like the tide display is now fixed on https://www.hc-iom.co.uk/WD-AJAX1/index.php

Don't think he uses PST, Ken  :-)
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #40 on: February 20, 2023, 05:28:23 PM »
Looks like he fixed it.. now showing GMT
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 hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #41 on: February 20, 2023, 06:25:06 PM »
if your referring to time on the tide dial when the page is first loaded it is wrong and only corrects if the page is refreshed but not actually sure what's wrong been doing it a while

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #42 on: February 20, 2023, 06:37:30 PM »
removing the units has sorted the errors but the daytime nitetime have 2 deg C with the values
https://www.hc-iom.co.uk/WD-AJAX3/index.php   with error on
https://www.hc-iom.co.uk/WD-AJAX1/index.php  normal altdash page with error off

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #43 on: February 20, 2023, 06:53:11 PM »
i think i may have missed a setting some where ref my last post

Offline HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #44 on: February 21, 2023, 11:42:06 AM »
Argggh... looks like a 'fix' I'd put in to 6.95e for wind was in error.  Now corrected.  Use both 6.95g ajaxWDwx3.js and ajax-dashboard6.php from the new 6.95g distribution in the legacy scripts area or the updated ones attached.  Now both Rain and Wind update as expected.

Morning, Ken!  The wind updating issue is completely fixed!  I will have to wait on the rain issue, as it rained overnight when i was fast asleep!  More rain this afternoon, so i will monitor and let you know the results!

Thanks again for everything!!


Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Rain Not updating in realtime & error
« Reply #45 on: February 21, 2023, 04:18:07 PM »
yes I fell foul of the wrong .js in settings-weather once corrected that sorted all bar the gremlin in the tides bit as ref in post #41
https://www.hc-iom.co.uk/WD-AJAX1/index.php
https://www.hc-iom.co.uk/WD-AJAX3/index.php is used for testing

Offline HamiltonNJWX

  • Senior Member
  • **
  • Posts: 60
    • HamiltonWx
Re: Rain Not updating in realtime & error
« Reply #46 on: February 22, 2023, 05:58:10 PM »
@saratogaWX . Hey, Ken. Everything is working except for the rain not updating in real time. After dinner, i am going to go through the ajax script and see if anything stands out when i compare to other variables.

Thanks for all your help on this.

John

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #47 on: February 23, 2023, 04:40:37 PM »
It should be if you've updated both ajaxWDwx3.js and ajax-dashboard6.php on your website.  You may need to clear your browser cache (do a shift-reload) to get the updated ajaxWDwx3.js to work for you.

I just checked your site, tried clicking on metric and imperial and saw green flash on both rain today displays (and units changing) so I think browser caching is preventing you from seeing the final results...
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 andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Rain Not updating in realtime & error
« Reply #48 on: February 28, 2023, 02:07:40 PM »
My dewpoint last hour is showing in the negative.
https://www.goblesweather.com/index.php

Chuck

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Rain Not updating in realtime & error
« Reply #49 on: March 01, 2023, 01:38:29 PM »
The underlying value is
Code: [Select]
$dewchangelasthour =  '-0.9';    // Dew point change last hour from testtags.php.

Somehow, the convDdif is converting that really wrongly.  I've got other issues I'm trying to solve with ajaxWDwx3.js also.. I'll add this to the list.
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

 

anything