Web Weather > Custom Website Templates

Detailed Reports problem php 8.0 and 8.1

(1/9) > >>

meteosa:
I set the php version of my site from php 7.4 to php 8.1 but i can't see rainy years anymore in "Rainfall Summary", it stops at year 2019 instead of going up to 2010 rain only, all others work (wind, temperature etc)
can anyone help me?
https://www.meteosantangelo.it/meteo/wxrainsummary.php
I noticed that other pages are also missing data, for example:
https://www.meteosantangelo.it/meteo/wxwindrunseason.php
Thank you

broadstairs:
Have you checked to see if there are any errors recorded on your server?

Stuart

meteosa:

--- Quote from: broadstairs on January 08, 2023, 05:39:51 AM ---Have you checked to see if there are any errors recorded on your server?

Stuart

--- End quote ---
Yes, there are many errors, it fills my file with many mb.
example:
PHP Fatal error:  Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in .../wxrainsummary.php:526
Stack trace:
#0 .../wxrainsummary.php(526): abs()
#1 .../wxrainsummary.php(370): trends_gen_difference()
#2 .../wxrainsummary.php(177): get_rain_detail()
#3 {main}
  thrown in .../wxrainsummary.php on line 526

broadstairs:
Well that explains it. The something in V8 has changed and this line no longer works because the value is not of the correct type. I suspect there may be a later version of the script available to fix this. I do not use these scripts so am not aware of where they come from.

Stuart

meteosa:

--- Quote from: broadstairs on January 08, 2023, 05:53:17 AM ---Well that explains it. The something in V8 has changed and this line no longer works because the value is not of the correct type. I suspect there may be a later version of the script available to fix this. I do not use these scripts so am not aware of where they come from.

Stuart

--- End quote ---
Yes exactly, I don't know where to start as I don't know much about php, the dcript package can be downloaded from: https://weather.wildwoodnaturist.com/downloads.php and it's the "Detail/Summary/Season Files ...." if anyone can make it work for php 8 that would be great.
Thank you

Navigation

[0] Message Index

[#] Next page

Go to full version