Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
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
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
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
a PHP import script for DayFile and Monthly log files
- 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: a PHP import script for DayFile and Monthly log files
data/Jan10log.txt
./data/Jan10log.txt
Are identical in meaning - the sub-directory [data] of the directory the executed code is in.
However: /data/Jan10log.txt - would mean the directory [data] in the 'root' (top level) directory, and
../data/Jan10log.txt - would mean the directory [data] in the 'parent' directory (one above) of the directory the code is being run from.
./data/Jan10log.txt
Are identical in meaning - the sub-directory [data] of the directory the executed code is in.
However: /data/Jan10log.txt - would mean the directory [data] in the 'root' (top level) directory, and
../data/Jan10log.txt - would mean the directory [data] in the 'parent' directory (one above) of the directory the code is being run from.
......................Imagine, what you will KNOW tomorrow !
- daj
- Posts: 2041
- Joined: Tue 29 Jul 2008 8:00 pm
- Weather Station: WH1081
- Operating System: Pi & MX
- Location: SW Scotland
- Contact:
Re: a PHP import script for DayFile and Monthly log files
I was about to post the same thing. I made the change to the Wiki as it perhaps reads a little better, but in the end it is down to your webserver file locations, and the wiki does say that the file location is relativebeteljuice wrote:data/Jan10log.txt
./data/Jan10log.txt
Are identical in meaning - the sub-directory [data] of the directory the executed code is in.
-
- Posts: 54
- Joined: Sun 01 May 2011 7:13 pm
- Weather Station: Watson
- Operating System: Windows 7
- Location: Funchal
Re: a PHP import script for DayFile and Monthly log files
Hi i´m traing to use the script Import Cumulus Monthly Log, but can´t get it work, anny help?
thanks
like you can see http://meteocasas.com/ImportCumulusFile.php i didnt put any thing on the file. Wen a put the
$dbhost = "127.0.0.1";
$dbuser ="user";
$dbpassword ="password";
$database ="database";
with my user e pass, and e sow the same like you can see on the link
thanks
like you can see http://meteocasas.com/ImportCumulusFile.php i didnt put any thing on the file. Wen a put the
$dbhost = "127.0.0.1";
$dbuser ="user";
$dbpassword ="password";
$database ="database";
with my user e pass, and e sow the same like you can see on the link
-
- Posts: 54
- Joined: Sun 01 May 2011 7:13 pm
- Weather Station: Watson
- Operating System: Windows 7
- Location: Funchal
Re: a PHP import script for DayFile and Monthly log files
Someone who can help. With this script I'm not getting.
If anyone have a better way to import data automatically thanked.
If anyone have a better way to import data automatically thanked.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: a PHP import script for DayFile and Monthly log files
You need to ad some code and the importfile must be on the serverinaciovieira wrote:Someone who can help. With this script I'm not getting.
If anyone have a better way to import data automatically thanked.
try http://meteocasas.com/ImportCumulusFile ... n10log.txt
Full details on the wiki http://wiki.sandaysoft.com/a/ImportCumulusFile you need to set a security key by yourself
-
- Posts: 54
- Joined: Sun 01 May 2011 7:13 pm
- Weather Station: Watson
- Operating System: Windows 7
- Location: Funchal
Re: a PHP import script for DayFile and Monthly log files
Thank its working know,
does all the file automatically or I have to always open the file to send it to database?
does all the file automatically or I have to always open the file to send it to database?
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: a PHP import script for DayFile and Monthly log files
You can make a cron for executing the script on your server and you have to ftp the logs to your server , I use toolbox for doing these tasks but there are also ways to ad tasks in the cumulus.ini file I think.inaciovieira wrote:Thank its working know,
does all the file automatically or I have to always open the file to send it to database?
-
- Posts: 54
- Joined: Mon 19 Mar 2012 11:47 am
- Weather Station: WMR 200 by Oregon Scientific
- Operating System: WinXP SP3
- Location: Belgium
Re: a PHP import script for DayFile and Monthly log files
Hi !
Using this script for weeks and now, i'll add some other values like UV index and more. How to add these ?
Thx
Using this script for weeks and now, i'll add some other values like UV index and more. How to add these ?
Thx
http://www.7331.be/meteo website based on the phpBB3 forum and template. WMR200 + UVN 800 - Cumulus 1.9.4 1062 / Windows XP Service Pack 3 build 2600 FR
- nikokara
- Posts: 11
- Joined: Fri 14 Oct 2011 3:13 pm
- Weather Station: OlympData Offset
- Operating System: Winxp
- Location: Greece
Re: a PHP import script for DayFile and Monthly log files
Hi friends
First off all Sorry for my bad English
My problem is with the ImportCumulusFile.php.
Server (webserver and mysql) is on localhost and running ok
I try to import a file to Mysql via
http://127.0.0.1:4001/weather/ImportCum ... n11log.txt
and have the error:
07/11/13 - 18:17:53
Importing to table: Dayfile ...
Processing dayfile: ./data/Jan11log.txt
Error: Failed to open file: ./data/Jan11log.txt07/11/13 - 18:17:53
What is wrong
The file Jan11log.txt exists but not the file Jan11log.txt07/11/13 - 18:17:53
Thank You
First off all Sorry for my bad English
My problem is with the ImportCumulusFile.php.
Server (webserver and mysql) is on localhost and running ok
I try to import a file to Mysql via
http://127.0.0.1:4001/weather/ImportCum ... n11log.txt
and have the error:
07/11/13 - 18:17:53
Importing to table: Dayfile ...
Processing dayfile: ./data/Jan11log.txt
Error: Failed to open file: ./data/Jan11log.txt07/11/13 - 18:17:53
What is wrong
The file Jan11log.txt exists but not the file Jan11log.txt07/11/13 - 18:17:53
Thank You
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: a PHP import script for DayFile and Monthly log files
Have you tried calling that URL from a browser? (?My suspicion is that the extra text is being added by a cache buster?)
You could also try moving the parameters around, and see if the error moves to last parameter, for example...
http: //127.0.0.1:4001/weather/ImportCumulusFile.php?key=letmein&table=Dayfile&file=./data/Jan11log.txt&type=dayfile
Or adding a trailing ampersand...
http: //127.0.0.1:4001/weather/ImportCumulusFile.php?type=dayfile&key=letmein&table=Dayfile&file=./data/Jan11log.txt&
You could also try moving the parameters around, and see if the error moves to last parameter, for example...
http: //127.0.0.1:4001/weather/ImportCumulusFile.php?key=letmein&table=Dayfile&file=./data/Jan11log.txt&type=dayfile
Or adding a trailing ampersand...
http: //127.0.0.1:4001/weather/ImportCumulusFile.php?type=dayfile&key=letmein&table=Dayfile&file=./data/Jan11log.txt&
Last edited by mcrossley on Thu 07 Nov 2013 6:06 pm, edited 1 time in total.
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: a PHP import script for DayFile and Monthly log files
Also I note you are calling the local server loopback address (127.0.0.1), in that case you can cut out the web server completely, and run the script directly from PHP - the syntax to use is in the script header.
- nikokara
- Posts: 11
- Joined: Fri 14 Oct 2011 3:13 pm
- Weather Station: OlympData Offset
- Operating System: Winxp
- Location: Greece
Re: a PHP import script for DayFile and Monthly log files
Thank You
Nothing, the same error. Time is added to file name extension
Nothing, the same error. Time is added to file name extension
- mcrossley
- Posts: 12903
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: a PHP import script for DayFile and Monthly log files
Ah, I see the problem. The script is missing a LF after the error message. So it should read...
Error: Failed to open file: ./data/Jan11log.txt
07/11/13 - 18:17:53
It can't find your file.
Error: Failed to open file: ./data/Jan11log.txt
07/11/13 - 18:17:53
It can't find your file.
- nikokara
- Posts: 11
- Joined: Fri 14 Oct 2011 3:13 pm
- Weather Station: OlympData Offset
- Operating System: Winxp
- Location: Greece
Re: a PHP import script for DayFile and Monthly log files
PHP runs as apache module. No luck with thismcrossley wrote:Also I note you are calling the local server loopback address (127.0.0.1), in that case you can cut out the web server completely, and run the script directly from PHP - the syntax to use is in the script header.