Author Topic: wxsoil with php 8.3  (Read 1402 times)

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
wxsoil with php 8.3
« on: February 22, 2025, 06:10:23 PM »
My wxsoil script stopped working when I updated to php 8.3. I have all Zeros on my page.

The latest version I found and running is... // Version 1.03 ALPHA 15-SEP-2012 - Initial Version 1 release

Anyone else have this script working with 8.3?

I know my sensors are working because I got data showing here. https://www.northbendweather.com/wxsoiltempdetail.php

Thanks
https://www.northbendweather.com/wxsoil.php
« Last Edit: February 22, 2025, 06:15:01 PM by ALITTLEweird1 »
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 192
    • Ballaugh Weather
Re: wxsoil with php 8.3
« Reply #1 on: February 23, 2025, 05:53:48 AM »
Try adding

error_reporting(E_ALL ^ E_NOTICE);
error_reporting(E_ALL);
ini_set('display_errors','1');

Under the <?php at the top of the wxsoil.php and see if you get a load of error to give a clue as that script is old and not 8.3 compatible

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #2 on: February 23, 2025, 12:19:38 PM »
Try adding

error_reporting(E_ALL ^ E_NOTICE);
error_reporting(E_ALL);
ini_set('display_errors','1');

Under the <?php at the top of the wxsoil.php and see if you get a load of error to give a clue as that script is old and not 8.3 compatible

Well this doesn't look good...lol  https://www.northbendweather.com/wxsoil.php
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 192
    • Ballaugh Weather
Re: wxsoil with php 8.3
« Reply #3 on: February 23, 2025, 12:57:17 PM »
It’s the Deprecated errors that need to be sorted the warning less so
I am not familiar with the script your using but the Deprecated errors relate to rounding or preg-match of null values other on here have had these come suggest tying a search and if Ken see this and is well enough he may steer you in the right direction

Offline swright1957

  • Senior Member
  • **
  • Posts: 85
    • Hytheweather.co.uk
Re: wxsoil with php 8.3
« Reply #4 on: February 24, 2025, 09:31:58 AM »
Hi all.
Just as a matter of interest where did the wxsoil script come from and can I have a copy please????  :grin:
"anything's possible with the weather"



Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #5 on: February 24, 2025, 05:49:38 PM »
Hi all.
Just as a matter of interest where did the wxsoil script come from and can I have a copy please????  :grin:

Depending on what PHP version your using, It no longer works as you can see from my other post.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline swright1957

  • Senior Member
  • **
  • Posts: 85
    • Hytheweather.co.uk
Re: wxsoil with php 8.3
« Reply #6 on: February 25, 2025, 03:56:17 AM »
Hello
Im using 8.2, so would like a copy and I can see if I can get it to work with 8.2 and 8.3
"anything's possible with the weather"



Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #7 on: February 25, 2025, 07:21:11 PM »
I'll post those files once we get power and internet back. We just had a big wind storm.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #8 on: February 27, 2025, 09:20:32 PM »
Hello
Im using 8.2, so would like a copy and I can see if I can get it to work with 8.2 and 8.3

The files are attached. Let me know if you get the script working.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #9 on: April 10, 2025, 11:39:13 AM »
Were you able to find a fix for this script?
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline swright1957

  • Senior Member
  • **
  • Posts: 85
    • Hytheweather.co.uk
Re: wxsoil with php 8.3
« Reply #10 on: April 11, 2025, 05:46:16 AM »
Hi now sorry have now downloaded them, but ive been on my hols so no chance, will look over the weekend
"anything's possible with the weather"



Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 2068
    • My PWS at Leuven Belgium Europe
Re: wxsoil with php 8.3
« Reply #11 on: April 11, 2025, 06:24:58 AM »
Were you able to find a fix for this script?

There is no "fix" needed. The script already works without problems with PHP 8.x.

The errors are caused by missing fields.
In your script the lines 44-48 read:
Code: [Select]
     <div id="main-copy">
<?php

?>
<!-- WXSOIL START -->
I added all used fields with some values as I do not have those sensors in my test-files.
Code: [Select]
    <div id="main-copy">
<?php
# for test 
$soiltemp 10;
$soiltemp2 20;
$VPsoilmoisture 11;
$VPsoilmoisture2 21;
$yrecordhighsoil 30;
$yrecordlowsoil 0;
$VPsoiltemp2 $yrecordhighsoilmonth $yrecordlowsoilmonth $yrecordhighsoilday $yrecordlowsoilday =
$yrecordhighsoil2 $yrecordlowsoil2 $yrecordhighsoilmonth $yrecordlowsoilmonth2 $yrecordhighsoilday2 
$yrecordlowsoilday2 $yrecordhighsoilmonth2 $recordhighsoil $recordlowsoil $recordhighsoilmonth =
$recordhighsoilday 
$recordlowsoilmonth =  $recordhighsoilyear $recordlowsoilday $recordlowsoilyear $recordhighsoil2 =
$recordlowsoil2  $recordhighsoilmonth2 $recordlowsoilmonth2 $recordhighsoilday2  $recordlowsoilday2 =
$recordhighsoilyear2 =  $recordlowsoilyear2 =
44;

$avtempjannowsoil $avtempfebnowsoil $avtempmarnowsoil $avtempaprnowsoil $avtempmaynowsoil $avtempjunnowsoil =
$avtempjulnowsoil $avtempaugnowsoil $avtempsepnowsoil $avtempoctnowsoil $avtempnovnowsoil $avtempdecnowsoil =
55;
?>
<!-- WXSOIL START -->
The script works without errors if the fields used exist. See attached screenshot.

Maybe  there is a separate file for those soil-values, or another version of testtags.php is needed.

Regards,
Wim
« Last Edit: April 11, 2025, 07:22:28 AM by wvdkuil »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 2068
    • My PWS at Leuven Belgium Europe
Re: wxsoil with php 8.3
« Reply #12 on: April 11, 2025, 08:17:44 AM »
Those missing fields seems to be from the alt-dashboard scripts.
-> https://saratoga-weather.org/scripts-legacy.php#scott
--> Alt-Dashboard 6.95h Script

The download contains the Soil-leaf-Additional-testtags.txt
Add those to your testtags.txt in WD and the script should work.

Wim
« Last Edit: April 11, 2025, 08:20:29 AM by wvdkuil »

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: wxsoil with php 8.3
« Reply #13 on: April 12, 2025, 04:00:55 PM »
Thanks Wim. Got it working again.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture