Page 9 of 9

Re: a PHP import script for DayFile and Monthly log files

Posted: Fri 08 Nov 2013 11:57 pm
by nikokara
mcrossley wrote: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.
Thank You for your time

Yes you are right. It can't find my file (the file was here, bud with other localication ( Ιαν11log.txt))

A corection maybe for the next version of the script (v. 2.5)

About line 338 instead of
echo "Error: Failed to open file: $param_file"; This ===> Echo "Error: Failed to open file: $param_file " . $lf;

Re: a PHP import script for DayFile and Monthly log files

Posted: Sun 20 Aug 2017 12:56 pm
by ConligWX
HI

I found a script here:

http://wiki.sandaysoft.com/files/Import ... e_v3-0.txt

v3.0 but it is not listed or mentioned on the wiki page here: http://wiki.sandaysoft.com/a/ImportCumulusFile

is this a beta version?

Re: a PHP import script for DayFile and Monthly log files

Posted: Mon 21 Aug 2017 5:20 pm
by mcrossley
I probably just got distracted and forgot to update the Wiki page!

Let me know if it works - I don't use that script any longer since switching to MX.

Re: a PHP import script for DayFile and Monthly log files

Posted: Mon 21 Aug 2017 7:31 pm
by ConligWX
mcrossley wrote:I probably just got distracted and forgot to update the Wiki page!

Let me know if it works - I don't use that script any longer since switching to MX.
yep needed it on saturday after a hard disk failure.

my hdd image was about a month old but my mysql dump hadnt been working since around that time! so used the script to import the dayfile/monthly data back into the db.. it worked!

Script I used though was v2.8 and not the 3.0 i had found. was unsure it was official yet.

Re: a PHP import script for DayFile and Monthly log files

Posted: Tue 11 Sep 2018 8:04 pm
by powerr
I used the script (version 3.0) to import my Cumulus data for use with Cumulus MX. I noticed a problem with WindbearingSym and CurrWindBearingSym (and a small problem with the variable $tablename, which needs to be $tableName). I attached a new version of the script.

The problem was in this line: $bindParams[] = $compassp[((((int)$buf_arr[$windBearField[$i]] + 11) / 22.5) % 16)];. I changed it to $bindParams[] = $compassp[((((int)$buf_arr[$windBearField[$i] + 1] + 11) / 22.5) % 16)];.

Re: a PHP import script for DayFile and Monthly log files

Posted: Tue 11 Sep 2018 10:35 pm
by mcrossley
Thanks for the update. The table name typo was fixed in version 3.1 back in March.

Thanks for the heads up on the issue with the wind symbol. I've updated the wiki to version 3.2 to incorporate your change, though I have implemented it in a different way. Your fix would work for the monthly log file, but break the daily log file import.

Re: a PHP import script for DayFile and Monthly log files

Posted: Wed 12 Sep 2018 5:37 pm
by powerr
I used the link in the Installation section in the wiki, which was version 3.0, so I was missing the table name typo fix.

Thank you for updating the wiki and the script. I only needed to import the monthly log files and didn't check for possible issues elsewhere, caused by my change.

Re: a PHP import script for DayFile and Monthly log files

Posted: Wed 12 Sep 2018 6:19 pm
by mcrossley
powerr wrote:I used the link in the Installation section in the wiki, which was version 3.0, so I was missing the table name typo fix.
Yeah, sorry the wiki had an out of date link near the top, the link in the version list was ok.