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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

ExtraLog*.txt to mysql and then to webpage

Talk about anything that doesn't fit elsewhere - PLEASE don't put Cumulus queries in here!
Post Reply
Snicker
Posts: 20
Joined: Tue 07 Jan 2014 2:54 pm
Weather Station: WMR100N
Operating System: Win2012R2
Location: Norway
Contact:

ExtraLog*.txt to mysql and then to webpage

Post by Snicker »

Hi,

A friend made me a php script that takes out the data from the ExtraLog*.txt file and inserts it into mysql server, and then make a graph out of the SQL data with PHP. Anyone good at PHP that can help me put this up again on another site?

It is a cronjob.php that runs every 10 min automaticly,
and the index.php that shows the graph.
Where there's pleasure... there's always some pain!
-Snicker-
Snicker
Posts: 20
Joined: Tue 07 Jan 2014 2:54 pm
Weather Station: WMR100N
Operating System: Win2012R2
Location: Norway
Contact:

Re: ExtraLog*.txt to mysql and then to webpage

Post by Snicker »

Here is the link to the php script reading the log file and putting the data into the SQL.

https://pastebin.com/Smy4BS1m

Getting this error when I try to run the php.

Notice: Undefined variable: wdato in D:\wamp64\www\temp\cronjob.php on line 81
Where there's pleasure... there's always some pain!
-Snicker-
Snicker
Posts: 20
Joined: Tue 07 Jan 2014 2:54 pm
Weather Station: WMR100N
Operating System: Win2012R2
Location: Norway
Contact:

Re: ExtraLog*.txt to mysql and then to webpage

Post by Snicker »

Found out,

Had to create a new structure like this on the SQL:

https://www.dropbox.com/s/s1zb17z2b1dwp ... e.PNG?dl=0

And then insert a new fictive one for the script to check. Then it worked.
Where there's pleasure... there's always some pain!
-Snicker-
hruska07
Posts: 4
Joined: Fri 11 Aug 2017 3:33 pm
Weather Station: Davis VP2
Operating System: Windows 10

Re: ExtraLog*.txt to mysql and then to webpage

Post by hruska07 »

Hello, i have problem to import Cummulusfile to MySQL database. It caused an error about connection to the database server....Any idea? I would be glad.
You do not have the required permissions to view the files attached to this post.
Post Reply