Page 57 of 59
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 7:45 pm
by ConligWX
that maybe the case, but the console doesnt lie. "file not found" means something.

Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 8:23 pm
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!

Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 8:35 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 8:54 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 8:54 pm
by freddie
It won't be completely backward compatible between major versions - i.e. 7.x to 8.x.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 8:59 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 9:00 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 9:26 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 10:37 pm
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
Re: Yet Another Dayfile Reader (PHP)
Posted: Tue 02 Jul 2024 11:11 pm
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.
Re: Yet Another Dayfile Reader (PHP)
Posted: Wed 03 Jul 2024 5:30 am
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!!
Re: Yet Another Dayfile Reader (PHP)
Posted: Wed 03 Jul 2024 1:04 pm
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?
Re: Yet Another Dayfile Reader (PHP)
Posted: Wed 03 Jul 2024 10:38 pm
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
Re: Yet Another Dayfile Reader (PHP)
Posted: Sun 11 Aug 2024 7:39 am
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
Line 2424
Code: Select all
if (isset($_GET['data'])) {
$dataSet = $_GET['data'];
} else {
$dataSet = 'avgtemp'; // default dataset
}
Re: Yet Another Dayfile Reader (PHP)
Posted: Sun 11 Aug 2024 9:15 am
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.