Page 55 of 59
Re: Yet Another Dayfile Reader (PHP)
Posted: Thu 01 Feb 2024 9:33 am
by mcrossley
Well Cumulus won't invent it

just to be clear, you see decimal values on the dashboard other than x.0?
If you don't, then there is no point is displaying the decimal and you could set it to 0 in the settings.
Re: Yet Another Dayfile Reader (PHP)
Posted: Thu 28 Mar 2024 3:20 pm
by 92merc
Is the dayfile reader compatible with the new V4?
Re: Yet Another Dayfile Reader (PHP)
Posted: Thu 28 Mar 2024 3:22 pm
by mcrossley
Yes
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 9:06 am
by Dador
Hi,
I recently updated php on the server to version 8.3.7 and accidentally discovered that some data in the betel_readDayfile.php script (SunHours, EVT, HighUV) is not working. The rest works fine. I installed the latest version 7.1.4 but it didn't help.
Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". In the php version 7.4.33 that I am currently using, everything works.
Does anyone have an idea what I can change in betel_readDayfile.php to make it compatible with php 8.3?
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 10:08 am
by ConligWX
Dador wrote: ↑Mon 03 Jun 2024 9:06 am
Hi,
I recently updated php on the server to version 8.3.7 and accidentally discovered that some data in the betel_readDayfile.php script (SunHours, EVT, HighUV) is not working. The rest works fine. I installed the latest version 7.1.4 but it didn't help.
Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". In the php version 7.4.33 that I am currently using, everything works.
Does anyone have an idea what I can change in betel_readDayfile.php to make it compatible with php 8.3?
unless you post the error, how can we suggest a fix? the code will need to be changed more likely due to depricated code.
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 10:10 am
by water01
It would help if you told us what PHP error the dayfile reader is giving and which lines. The PHP code in the reader is compatible with PHP 7.x but not *.x and I think I modified mine but cannot remember what I did!!
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 10:33 am
by Dador
It's hard for me to enter any errors when the browser doesn't display them. After clicking on e.g. EVT, the page is empty, without any message.
I tried to paste something about ignoring errors into the script, but it didn't work.
It looks like the new php doesn't accept empty fields.
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 10:55 am
by water01
Can you look for the php errors log on your server?
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 11:03 am
by water01
OK I switched my PHP to PHP 8.0.30 and mine is working correctly.
Have attached the source as I cannot remember what I changed!!
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 11:39 am
by Dador
Ok,
but if you want, you can check if the script will work in php 8.
Just remove the random value (temp, hum, solar, etc.) in dayfile.txt on server and see what happens.
e.g.
Code: Select all
02/06/24,27,169,07:24,13.5,23:46,19.6,(...)
02/06/24,27,169,07:24,13.5,23:46,, <- empty field
In version 7.4 this is possible, in version 8.* probably not.
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 2:50 pm
by PaulMy
Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". I
Were these 'blanks' created through the CreateMissing utility or another way?
I am running CMXv4 and PHP 8.0 with GoDaddy and that works fine. I have not tried a later PHP version.
My dayfile did not have sunhours until I got the B-L sunrecorder in 2011, and then in 2018 I upgraded to VP2 Plus which included UV and solar. Running the CreateMissing when Mark introduced this that filled in all the missing fields since 2008 with 0.0 or 0.00.
Enjoy,
Paul
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 5:58 pm
by Dador
PaulMy wrote: ↑Mon 03 Jun 2024 2:50 pm
Were these 'blanks' created through the CreateMissing utility or another way?
Yes, you could say that I manually removed the "0.0" values.
Re: Yet Another Dayfile Reader (PHP)
Posted: Mon 03 Jun 2024 6:05 pm
by meteosangonera
Hi,
I have the same problem as @water01
water01 wrote: ↑Mon 03 Jun 2024 10:10 am
It would help if you told us what PHP error the dayfile reader is giving and which lines. The PHP code in the reader is compatible with PHP 7.x but not *.x and I think I modified mine but cannot remember what I did!!
But even weirder, I'll quickly comment:
I have three versions of DayfileReader, two work and one does not.
The version of my weather station is working properly.
https://www.meteosangonera.es/meteo/vis ... /basic.php
In addition, I have two versions to read the data from the official weather station in my area:
The first one, I modified it to work with data from the 20th century (1900). It works correctly.
https://www.meteosangonera.es/meteo/vis ... /basic.php
The second is for data from the year 2000 onwards. It is precisely this one that does not work.
https://www.meteosangonera.es/meteo/vis ... /basic.php
The error shown is:
Code: Select all
[03-Jun-2024 17:36:35 UTC] PHP Fatal error: Uncaught TypeError: cal_days_in_month(): Argument #3 ($year) must be of type int, string given in /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php:1393
Stack trace:
#0 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php(1393): cal_days_in_month(0, 1, '200-1')
#1 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php(2430): drawCalendar('2024')
#2 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/basic750.php(11): include('/home/elvtogcd/...')
#3 {main}
thrown in /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php on line 1393
The corresponding line is:
Code: Select all
$short = (count($turd) < cal_days_in_month(CAL_GREGORIAN, $m_offset[$m], $typeS_year[$d]) ? "* " : ""); // doesn't matter about 'previous' December - will always be 31
I can't find a way to solve it, although I think it must be related to the solar information, as I gather from that line.
Re: Yet Another Dayfile Reader (PHP)
Posted: Sun 30 Jun 2024 1:44 am
by Super-T
My betel dayfile reader stopped working a few days ago as if a timeout happened or a date expired. Nothing has changed on my website and I was wondering if anyone else has the same problem before I go delving into why it stopped?
If you goto History on my first page you will see if it works for you.
Re: Yet Another Dayfile Reader (PHP)
Posted: Sun 30 Jun 2024 6:21 am
by AndyKF650
Hi Terry
I looked at your history page and there is no information, just a blank screen. My beteljuuice dayfile reader works just fine.
I expect that you have changed a link to it. Good luck with the problem solving.