Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX »

that maybe the case, but the console doesnt lie. "file not found" means something. :lol:
Mapantz
Posts: 1992
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

The page would still load without any styling.

I'll bet that it's to do with being on PHP 8.*

My custom SQL version stopped working when I went from 7.4 to 8.2.

I spent a bit of time going through all of the errors and learning how to fix them - got there in the end! :lol:
Image
RayProudfoot
Posts: 3602
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by RayProudfoot »

Shouldn’t each version of PHP be backward compatible? I have asked this before but no one answered. Is going to PHP v8 a user action or forced by the host?

If a user action just revert to v7.
Cheers,
Ray, Cheshire.

Image
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX »

RayProudfoot wrote: Tue 02 Jul 2024 8:35 pm Shouldn’t each version of PHP be backward compatible? I have asked this before but no one answered. Is going to PHP v8 a user action or forced by the host?

If a user action just revert to v7.
should is in the ideal world, v8.1.x v8.2.x and 8.3.x all have depricated code. this means scripts that are written for v.7.x.x would possibly need recoded. some code is minor however, but the apache logfile will show you whats wrong, and chatgpt can do the rest (sometimes)


PHP 5.6, 7.0, 7.1, 7.2, 7.3, and 7.4 End of Life, no support and will contain security flaws.
Last edited by ConligWX on Tue 02 Jul 2024 8:55 pm, edited 1 time in total.
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by freddie »

It won't be completely backward compatible between major versions - i.e. 7.x to 8.x.
Freddie
Image
RayProudfoot
Posts: 3602
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by RayProudfoot »

Right, we’ve established v8 may not be fully backward compatible. But did Terry update to v8 or was it forced on him.
Cheers,
Ray, Cheshire.

Image
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

And if like my hosting ISP it has a Cpanel that allows you decide which version of PHP you are running, you can choose not to run PHP 8.0.
David
Image
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX »

so i'm running php 8.3.8 (8.3.9 just released) and waiting to apache 2.4.60 to land without issues.

I've never used this script, but downloaded it and stuck it on the website just to see does it work, with very minumal input/editing just out of curiousity.

and it does - not sure what the issues is when its working for me.

now I have not added it to any php page, just using the basic700.php and it works.

https://www.conligwx.org/year/basic700.php

PS years are incomplete since I was using meteobridge for a wile and weewx aslo. all data however is in meteobridge. just need to create all the missing monthly logs lol


I would guess that if someone has moved from php7.x to php 8.x you need to make sure the modules that are in 7.x are apparent in the compiled php 8 code as well. the script works without being changed so something else is missing. eith user configuration or php 8 does not have the correct modules.

you'd need to check phpinfo.php on 7.x and then make sure it also has the same modules on 8.x or start reading apache log files.
Last edited by ConligWX on Tue 02 Jul 2024 10:40 pm, edited 1 time in total.
User avatar
Super-T
Posts: 906
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Super-T »

Still waiting for an answer from my ISP but changed to Version 8 would make sense to cause a problem. I do have CPanel but no idea as to where to look as I am not familiar with PHP stuff at all as you can probably see :-)
I could zip up the 4 files from Betel that are currently on the website if someone can try running it on their PC?

I was more of an Industrial robotic programmer so HELP.

Running checkserver.php
Does PHP work?
Yes, it does. Your server has PHP Version 8.1.29

Current GD status:
GD support: YES
GD Version: bundled (2.1.0 compatible)
FreeType Support: yes
FreeType Linkage: with freetype
GIF Read Support: yes
GIF Create Support: yes
JPEG Support: yes
PNG Support: yes
WBMP Support: yes
XPM Support: yes
XBM Support: yes
WebP Support: yes
BMP Support: yes
AVIF Support: no
TGA Read Support: yes
JIS-mapped Japanese Font Support: no

Home Directory: /home2/janterco/public_html/weather
If you don't see "Yes, it does." in large font above, then PHP is not enabled.
For most Graphic scripts to run, you must see GD support with YES

I guess someone could run the checkserver.php on my site for more info? Not sure if you need permissions?
https://www.janter.co.nz/weather/checkserver.php

T
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

In your Cpanel you should see a group called Software. In that you should see MultiPHP Manager.

Open it and you should see a line showing you the current version of PHP being run for your domain.

Above it should be a drop down showing all the versions that they support. Mine shows me all the versions of Version 7 and Version 8.0.

To change the one you are using tick the box to the extreme left of the line showing what is being currently run, then go up to the drop down and select the one you want to use (suggest 7.4) and click on Apply.

It should then say Success and you will see the line change.
David
Image
User avatar
Super-T
Posts: 906
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Super-T »

Yay, it's all back. I think the ISP must have changed to 8.1. Now set to 7.4 as suggested. Thanks very much Water!!
User avatar
De Hout
Posts: 92
Joined: Thu 09 Oct 2014 5:40 pm
Weather Station: Davis Vantage Pro2+ FARS
Operating System: Windows 11 | CU v1.9.4 (10992)
Location: Alkmaar, The Netherlands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by De Hout »

Glad that it works again.

However, I suspect that your version of Yet Another Dayfile Reader is not the most recent one.
I am using PHP version 8.1.29 with YADR V7.1.4 (standalone) on my website, and it works as it should.
Unfortunately, the version information is not present in your YADR code. Perhaps you can check that somewhere?
Derk

Image
User avatar
Super-T
Posts: 906
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Super-T »

Quite possible not the latest Yet Another Dayfile Reader as Betel did some changes on mine, no idea what, but it has been running like that for years. Hopefully it will outlast me now that it is back up :-)
T
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Dador »

A few messages earlier, I described my problem with php 8.3.
Yesterday my hosting updated something and now it logs me errors.
I have something like this.

Code: Select all

Stack trace:
#0 /home/pogodary/domains/pogodarybnik.pl/public_html/betel_readDayfile.php(2424): drawCalendar()
#1 {main}
  thrown in /home/pogodary/domains/pogodarybnik.pl/public_html/betel_readDayfile.php on line 1224
[11-Aug-2024 07:23:51 UTC] PHP Warning:  Undefined array key 2018 in /home/pogodary/domains/pogodarybnik.pl/public_html/betel_readDayfile.php on line 1355
[11-Aug-2024 07:23:51 UTC] PHP Fatal error:  Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /home/pogodary/domains/pogodarybnik.pl/public_html/betel_readDayfile.php:1355
Line 1224 and 1355

Code: Select all

$tablelayout .=  '<td';

Line 2424

Code: Select all

if (isset($_GET['data'])) {
    $dataSet = $_GET['data'];
} else {
    $dataSet = 'avgtemp'; // default dataset
}
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by AndyKF650 »

Hi there

That looks a bit odd to me, your error lines show code which is different to mine.

I have attached a zipped copy of my working file which seems to work fine for me. It is modified a bit to change the order of the presented data and to the correct location.

Give it a try and see if that works for you.
You do not have the required permissions to view the files attached to this post.
Post Reply