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
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
PHP script to display monthly/yearly snow depth totals from diary.db
Moderator: daj
-
surban21
- Posts: 55
- Joined: Wed 07 Dec 2016 1:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
Re: PHP script to display monthly/yearly snow depth totals from diary.db
Dador - I'm almost ... almost ... certain the problem is coming from somewhere in your CMX Internet Settings. Could you attach a screenshot of Web/Upload Site and External Programs that are in the Internet Settings? I'm not an expert but I may be able to spot something. Further, are you using FTP to upload to your server or are you using the new PHP upload method which was implemented in CMX sometime in version 4.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
I use the traditional FTP method to send data to the server. As I mentioned, I didn't change the settings from the beginning when I ran the script, so it's strange that it suddenly stopped working.
Below is the configuration I use. Additionally, I am adding diary.db with new snow data from November and snowSummaryDataT.txt, the recording of which ended on October 2.
Currently, I use a package to handle php-8.3.14-Win32-vs16-x64.
Below is the configuration I use. Additionally, I am adding diary.db with new snow data from November and snowSummaryDataT.txt, the recording of which ended on October 2.
Currently, I use a package to handle php-8.3.14-Win32-vs16-x64.
You do not have the required permissions to view the files attached to this post.
-
surban21
- Posts: 55
- Joined: Wed 07 Dec 2016 1:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
Re: PHP script to display monthly/yearly snow depth totals from diary.db
Are you using XAMPP with PHP installed through XAMPP? My Daily program is: C:\xampp\php\php-win.exe. I see yours as C:\PHP\php-win.exe.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
I removed xampp because I initially thought it was its fault.
Now I have the php package downloaded from this site -> https://windows.php.net/downloads/releases/
Now I have the php package downloaded from this site -> https://windows.php.net/downloads/releases/
-
surban21
- Posts: 55
- Joined: Wed 07 Dec 2016 1:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
Re: PHP script to display monthly/yearly snow depth totals from diary.db
Oh OK. Could you also attach screenshot of the settings under the "Web/Upload Site" heading in CMX Internet Settings. Maybe there's a clue in that? 
You do not have the required permissions to view the files attached to this post.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
My settings:
You do not have the required permissions to view the files attached to this post.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
I try in different ways. Now by cmd. It causes an error.
Line 52 in my snowSumData.php
Code: Select all
c:\PHP>php.exe -f c:\CumulusMX_VP2\webMX\snowSumData.php
Fatal error: Uncaught PDOException: could not find driver in C:\CumulusMX_VP2\webMX\snowSumData.php:52
Stack trace:
#0 C:\CumulusMX_VP2\webMX\snowSumData.php(52): PDO->__construct('sqlite:\\Cumulus...')
#1 {main}
thrown in C:\CumulusMX_VP2\webMX\snowSumData.php on line 52Code: Select all
$pdo = new PDO($myDbase);-
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: PHP script to display monthly/yearly snow depth totals from diary.db
To me it looks like you need to install a sqlite PHP module. The module will contain the driver for the database connections.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
Ok,
I'll go back to xampp and play around.
I'll go back to xampp and play around.
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
It worked
Reinstalling xampp and executing the script through Windows task scheduler helped.
Now the question is whether CMX will also be able to do this, or whether I will stick to the task schedule.
Reinstalling xampp and executing the script through Windows task scheduler helped.
Now the question is whether CMX will also be able to do this, or whether I will stick to the task schedule.
-
surban21
- Posts: 55
- Joined: Wed 07 Dec 2016 1:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
Re: PHP script to display monthly/yearly snow depth totals from diary.db
Glad you were able to get it to run! I second what freddie said. If it's working using task scheduler, it "SHOULD" work again using CMX. At least it appears you're on the right track. Thanks @freddie for jumping in and giving your insight. 
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
My final conclusion is that since version 4.2 CMX has stopped executing external program parameters.
The snowSumData.php script works fine when I execute it via Windows Task Scheduler, but it doesn't work when I want to execute it via CMX.
I tried many ways to find a parameter that would work, but nothing worked.
The snowSumData.php script works fine when I execute it via Windows Task Scheduler, but it doesn't work when I want to execute it via CMX.
I tried many ways to find a parameter that would work, but nothing worked.
-
SamiS
- Posts: 510
- Joined: Sun 27 Feb 2011 5:13 pm
- Weather Station: Ecowitt HP2551 & GW1100
- Operating System: Raspberry Pi OS
- Location: Kangasala, Finland
Re: PHP script to display monthly/yearly snow depth totals from diary.db
If running external programs had been broken since the release of 4.2 over a month ago, someone else should have noticed it too. So there must be something else specific to your system affecting this.
One thing that comes to my mind, that are you running (the problematic instance of) CMX with the same user account that you are using to run the scheduled task (that works)?
One thing that comes to my mind, that are you running (the problematic instance of) CMX with the same user account that you are using to run the scheduled task (that works)?
- 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: PHP script to display monthly/yearly snow depth totals from diary.db
Well, I'm not saying it's a global CMX failure when it comes to executing external programs with parameters, but there's something to it.
@SamiS, quite recently I was contacted by email from a fellow Your countryman who uses the latest CMX release and also has a problem with the snowSumData script. I hope that when he comes across this thread, he will be able to run it, as I managed to do.
Currently, all cyclical external programs have been taken over by the Windows task scheduler. CMX is unemployed
@SamiS, quite recently I was contacted by email from a fellow Your countryman who uses the latest CMX release and also has a problem with the snowSumData script. I hope that when he comes across this thread, he will be able to run it, as I managed to do.
Currently, all cyclical external programs have been taken over by the Windows task scheduler. CMX is unemployed
-
surban21
- Posts: 55
- Joined: Wed 07 Dec 2016 1:22 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
Re: PHP script to display monthly/yearly snow depth totals from diary.db
Well something appears to have happened. I just upgraded to CMX 4.2,1 b4043 from 4.1.2 b4027 and the program parameters section of External Programs in CMX doesn't seem to process when trying to process php. I did not alter any settings during upgrade and started to get errors. The first error was: 2024-12-02 15:35:00 - Warning: Interval: External program 'C:\xampp\php\php-win' does not exist.
So I the added .exe to the end of this and fixed that error but now I get: 2024-12-02 16:05:08 - InitTCP: Error - Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host..
I'm not entirely sure but it appears either php is not executing from within CMX External Programs section and if it is it's not processing the program parameters. Now I run into the same scenario that Dador is having and snowSumData,php is not being processed since upgrading to 4.2.1 from 4.1.2.
I've done many upgrades in the past and haven't ran into any problems running the snow scripts until now. Any insight into this would be helpful.
EDIT: Reverted back to 4.1.2 b4027 and is processing normally.