Author Topic: Using PHP 8.2 with my current Scripts  (Read 775 times)

0 Members and 1 Guest are viewing this topic.

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Using PHP 8.2 with my current Scripts
« on: February 02, 2023, 06:45:46 PM »
My hosting service, ICDSoft, announced that they would like their clients to use PHP 8.2. Can I use my current  Saratoga scripts or do I need to modify them in some way?

Thanks,
Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Using PHP 8.2 with my current Scripts
« Reply #1 on: February 02, 2023, 06:58:57 PM »
Yes, if you are current on updates.  Use check-fetch-times.php?show=versions on your website to check.

This only applies to the template scripts in the Saratoga distributions.  Third-party add-ins may need updates.
« Last Edit: February 02, 2023, 07:01:16 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 Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Using PHP 8.2 with my current Scripts
« Reply #2 on: February 08, 2023, 03:48:27 PM »
With Ken's help I was able to use PHP 8.2.

I am now getting a few errors for my Hi-Lo Average History and do not know how to correct them. Is anyone able to help with these.
Thanks,
Joe

https://joesweather.info/wxhi-low-avg.php

Hi-Lo-Average History For Joes Weather
Since: July 22, 2019

Warning: Undefined variable $ADBversion in /home/joes/www/www/highlowavg3.php on line 99

Warning: Undefined variable $avgmonthrain1 in /home/joes/www/www/highlowavg3.php on line 140
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Using PHP 8.2 with my current Scripts
« Reply #3 on: February 08, 2023, 10:09:29 PM »
That's an old WebsterWeather (Scott) script.  Just delete line 99 (or comment it out with a # as the first character)

Change line 140 from
Code: [Select]
if($avgmonthrain1 == ''){
to
Code: [Select]
if(!isset($avgmonthrain1)){
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 Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Using PHP 8.2 with my current Scripts
« Reply #4 on: February 09, 2023, 06:47:26 AM »
Thank you, Ken.

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

 

anything