Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Yet Another Dayfile Reader (PHP)
Moderator: daj
-
- Posts: 38
- Joined: Sat 29 Jan 2011 7:08 pm
- Weather Station: Davis VP2 Plus
- Operating System: Rasbian on RPI
- Location: Durham, Co Durham
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Hi beteljuice
Thanks so much for the reply, small change and all working great including formatting. I was going to look at that when I got the tables working but it would have taken me ages - if ever.
I didn't think I had changed anything and was following the instructions. The line in the download is:-
$this_file_name = basename(__FILE__); // IMPORTANT - for best results this file should be in the SAME directory as the 'holding' page that uses it
So I just changed __FILE__ for the name of my file, should have known to put it in quotes.
That's the problem with doing stuff you don't understand, I have learned a huge amount though and thanks again for sorting it all for me.
Thanks
Thanks so much for the reply, small change and all working great including formatting. I was going to look at that when I got the tables working but it would have taken me ages - if ever.
I didn't think I had changed anything and was following the instructions. The line in the download is:-
$this_file_name = basename(__FILE__); // IMPORTANT - for best results this file should be in the SAME directory as the 'holding' page that uses it
So I just changed __FILE__ for the name of my file, should have known to put it in quotes.
That's the problem with doing stuff you don't understand, I have learned a huge amount though and thanks again for sorting it all for me.
Thanks
Stewart
www.stewartwlewis.com
www.stewartwlewis.com
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Yet Another Dayfile Reader (PHP)
Ahh ...
You only need to modify that line if the (whateveritscalled) file is NOT in the same directory as its 'container'
__FILE__ is php shorthand for this whateveritscalled
Code: Select all
$this_file_name = basename(__FILE__);
__FILE__ is php shorthand for this whateveritscalled
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Yet Another Dayfile Reader (PHP)
Just in case that last post was not entirely clear to someone who does not know PHP
__FILE__ (underline underline F I L E underline underline) represents in PHP the entire path of whatever file this syntax appears in
e.g. web_root/my_web_pages/betel_readDayfile.php
basename(__FILE__) represents only the last part of that filename e.g. betel_readDayfile.php
This does not change the basic message, put files in same directory and no path specifier is needed (although the dot notation ./betel_readDayfile.php can be used to stress it is in same directory)
__FILE__ (underline underline F I L E underline underline) represents in PHP the entire path of whatever file this syntax appears in
e.g. web_root/my_web_pages/betel_readDayfile.php
basename(__FILE__) represents only the last part of that filename e.g. betel_readDayfile.php
This does not change the basic message, put files in same directory and no path specifier is needed (although the dot notation ./betel_readDayfile.php can be used to stress it is in same directory)
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
Any idea's on why mine is broken?
Was fine a few days ago.
http://weather.inverellit.com/datasummary.php
http://weather.inverellit.com/checkserver.php
Background:-
Web Hosts have had major issues during the past 24 hours.
Emails up & down,
FTP the same,
Entire sites down.
cPanel not accessible.
Html & emails came back eventually, but PHP pages seemed to be the last to return, but just not including my dayfile reader.
Any thoughts?
Thanks
Phil.
Was fine a few days ago.
http://weather.inverellit.com/datasummary.php
http://weather.inverellit.com/checkserver.php
Background:-
Web Hosts have had major issues during the past 24 hours.
Emails up & down,
FTP the same,
Entire sites down.
cPanel not accessible.
Html & emails came back eventually, but PHP pages seemed to be the last to return, but just not including my dayfile reader.
Any thoughts?
Thanks
Phil.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Yet Another Dayfile Reader (PHP)
You are now on php 7.2.28 according to that page. If your provider has been making changes, what exactly have they altered?Phil23 wrote: ↑Wed 01 Jul 2020 10:56 am
http://weather.inverellit.com/checkserver.php
PHP pages seemed to be the last to return
What were you on before? Sometimes, new releases of PHP can stop code written for older PHP versions from working. I don't use this code from beteljuice, but it has been around for a while and might not be written for 7.2.
I once used 5.x, then 7.0 and later 7.1, but I skipped 7.2 and have been using 7.3.x for a while myself, (because some of my scripts fail with 7.4, and with moving home consequences I can't spare time to relearn PHP and rewrite my PHP scripts just now).
You could add
Code: Select all
error_reporting(E_ALL);
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Yet Another Dayfile Reader (PHP)
At the top of the file just 'reverse' all the comments and we'll try to make sense of it.
from:
To:
from:
Code: Select all
error_reporting(0); // Turn off error reporting
// ini_set('display_startup_errors',1);
// ini_set('display_errors',1);
// error_reporting(-1);
// error_reporting(E_ALL);
Code: Select all
// error_reporting(0); // Turn off error reporting
ini_set('display_startup_errors',1);
ini_set('display_errors',1);
error_reporting(-1);
error_reporting(E_ALL);
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
Thanks.
I suspect they attempted some failed upgrade process & as a result I did notice that PHP selections had changed.
Turned the error checking on & got this returned.
Thanks
Phil.
I suspect they attempted some failed upgrade process & as a result I did notice that PHP selections had changed.
Turned the error checking on & got this returned.
Code: Select all
Fatal error: Uncaught Error: Call to undefined function cal_days_in_month() in
/home/inv49478/public_html/weather/betel_readDayfile.php:685 Stack trace: #0
/home/inv49478/public_html/weather/betel_readDayfile.php(2454): drawCalendar('2020') #1
/home/inv49478/public_html/weather/datasummary.php(28): include_once('/home/inv49478/...') #2 {main} thrown in
/home/inv49478/public_html/weather/betel_readDayfile.php on line 685
Phil.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
Looks like it's a version compatibility thing.
Just tried reverting the domain to PHP 5.6 & it all behaves normally.
7.0 or later seems like where it breaks.
I'm happy to revert my site to 5.6, but if Beteljuice wants to test, I can leave it in the 7's.
Cheers.
Just tried reverting the domain to PHP 5.6 & it all behaves normally.
7.0 or later seems like where it breaks.
I'm happy to revert my site to 5.6, but if Beteljuice wants to test, I can leave it in the 7's.
Cheers.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 1808
- 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)
It should work fine on 7.* as stated in the first post.
It looks to me like the calendar support has been disabled in PHP.
Just tested the beteljuice's version on PHP 7.3.19, all works fine: https://warehamwx.co.uk/betel/basic.php
It looks to me like the calendar support has been disabled in PHP.
Just tested the beteljuice's version on PHP 7.3.19, all works fine: https://warehamwx.co.uk/betel/basic.php
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
Noticed I was on 7.1.1; just finished updating to 7.1.3. No Change.
I did notice a section with php extensions in cPanel, Can't see much that relates there.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 1808
- 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)
You might need to contact your hosting and check with them.
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
Don't know much about PHP, but noticed now that while I've selected 5.6 in one area, 7.1 is selected in another....
MultiPHP Manager Vs Select PHP Version.
Checkserver.php show 7.1.33........
MultiPHP Manager Vs Select PHP Version.
Checkserver.php show 7.1.33........
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Yet Another Dayfile Reader (PHP)
It would seem they haven't completely 'compiled' the php package.
Contact your support
With:
Fatal error: Uncaught Error: Call to undefined function cal_days_in_month()
Web says ...
"recompile php with the "--enable-calendar" option."
Contact your support
With:
Fatal error: Uncaught Error: Call to undefined function cal_days_in_month()
Web says ...
"recompile php with the "--enable-calendar" option."
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
I don't understand the Versions listed in the MultiPHP Manager.
There's:-
Which all seem to report the version chosen,
Then further down the list there's
When you choose from the first block you seem to get what you want.
Choosing from anything lower than 7.1 in the second block you get 7.1.
Calendar support seems to be in the ALT ones but not the EA's.
There's:-
Code: Select all
PHP 4.4 (alt-php44)
PHP 5.1 (alt-php51)
PHP 5.2 (alt-php52)
PHP 5.3 (alt-php53)
PHP 5.4 (alt-php54)
PHP 5.5 (alt-php55)
PHP 5.6 (alt-php56)
PHP 7.0 (alt-php70)
PHP 7.1 (alt-php71)
Then further down the list there's
Code: Select all
PHP 5.1 (ea-php51)
PHP 5.2 (ea-php52)
PHP 5.3 (ea-php53)
PHP 5.4 (ea-php54)
PHP 5.5 (ea-php55)
PHP 5.6 (ea-php56)
PHP 7.0 (ea-php70)
PHP 7.1 (ea-php71)
PHP 7.2 (ea-php72)
PHP 7.3 (ea-php73)
Choosing from anything lower than 7.1 in the second block you get 7.1.
Calendar support seems to be in the ALT ones but not the EA's.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 1808
- 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)
alt is something to do with cloudlinux. If ea is working correctly, that's the one to stick with.