Author Topic: Fatal Error showing on my home page  (Read 1647 times)

0 Members and 1 Guest are viewing this topic.

Offline ke9lz

  • De Pere - Athelstane Weather
  • Senior Contributor
  • ****
  • Posts: 150
    • De Pere Weather
Fatal Error showing on my home page
« on: October 15, 2024, 11:26:00 AM »
Hi,  Been battling a problem on my home page for a couple weeks and can't seem to figure out what is going on.  I am suspecting maybe a configuration problem with weather display because I had a power interruption with the computer that uploads the data to it but thinking I have that back to where it should be.  The error I am seeing is:

Fatal error: Uncaught TypeError: Unsupported operand types: float + string in /home/athelsta/public_html/weather/raintodate.php:128 Stack trace: #0 /home/athelsta/public_html/weather/raintodate.php(100): get_mtd_rain() #1 /home/athelsta/public_html/weather/ajax-dashboard.php(108): include_once('/home/athelsta/...') #2 /home/athelsta/public_html/weather/index.php(77): include_once('/home/athelsta/...') #3 {main} thrown in /home/athelsta/public_html/weather/raintodate.php on line 128.

Website address is https://weather.athelstanewi.com.  I have everything up to date.  Anyone have any ideas as to what is happening?

Thanks,  Steve
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9723
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Fatal Error showing on my home page
« Reply #1 on: October 15, 2024, 12:42:57 PM »
It looks like your site is missing the June, July, and August dailynoaareport files .. that is likely the cause of the issue.

Use WD to regenerate the missing report files and upload them to the website

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 ke9lz

  • De Pere - Athelstane Weather
  • Senior Contributor
  • ****
  • Posts: 150
    • De Pere Weather
Re: Fatal Error showing on my home page
« Reply #2 on: October 15, 2024, 12:47:25 PM »
Thanks Ken.  Can you point me in the right direction as to how to do that?
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9723
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Fatal Error showing on my home page
« Reply #3 on: October 15, 2024, 01:17:08 PM »
Sure.. Weather Display, View, Averages/Extremes/Noaa style reports, Noaa Reports TAB

 [ You are not allowed to view attachments ]

use the box as the bottom to select month and regenerate the dailynoaareport file(s).  You may have to manually upload them to your site afterwards.

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 ke9lz

  • De Pere - Athelstane Weather
  • Senior Contributor
  • ****
  • Posts: 150
    • De Pere Weather
Re: Fatal Error showing on my home page
« Reply #4 on: October 15, 2024, 09:22:24 PM »
I have the missing dailynoaareport files uploaded and still no go.  https://weather.athelstanewi.com/wxnoaaclimatereports.php  Still searching.
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9723
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Fatal Error showing on my home page
« Reply #5 on: October 15, 2024, 10:23:12 PM »
So try changing raintodate.php
Quote
$rain = isset($data[0][$d][8])?$data[0][$d][8]:'';
to
Quote
$rain = (isset($data[0][$d][8]) and is_numeric($data[0][$d][8]))?(float)$data[0][$d][8]:'';
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 ke9lz

  • De Pere - Athelstane Weather
  • Senior Contributor
  • ****
  • Posts: 150
    • De Pere Weather
Re: Fatal Error showing on my home page
« Reply #6 on: October 16, 2024, 12:42:51 PM »
Thanks Ken!  That was the magic needed to bring it back.  Not sure why this was needed but is this something that should be added as a update to that file?  I have another site using the same scripts that has been working all along that could be updated.
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9723
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Fatal Error showing on my home page
« Reply #7 on: October 16, 2024, 05:05:55 PM »
Yes, apply that to your other instance.  I'll update it in the 6.95h distribution too.  Glad it worked for 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 ke9lz

  • De Pere - Athelstane Weather
  • Senior Contributor
  • ****
  • Posts: 150
    • De Pere Weather
Re: Fatal Error showing on my home page
« Reply #8 on: October 17, 2024, 10:53:41 AM »
Thanks Ken for your many years of helping us!
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


 

anything