Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.2.3 build 3059 - 04 December 2019.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    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 » Thu 06 Apr 2017 1:45 pm

    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 » Fri 07 Apr 2017 3:23 pm

    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 » Fri 07 Apr 2017 4:52 pm

    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 » Fri 11 Aug 2017 3:40 pm

    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