ImportCumulusFile: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
306 bytes added ,  21:12, 22 August 2017
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
{{AddOnBanner|name=ImportCumulusFile|type=PHP|author=David A Jamieson / Mark Crossley|contact='DAJ' / 'mcrossley' via the forum|updated=27 April 2015|version=2.8}}
{{AddOnBanner|name=ImportCumulusFile|type=PHP|author=David A Jamieson / Mark Crossley|contact='DAJ' / 'mcrossley' via the forum|updated=3 November 2016|version=3.0}}


This is a PHP script designed to run on your webserver and import Cumulus log files into a MySQL database on your server.
This is a PHP script designed to run on your webserver and import Cumulus log files into a MySQL database on your server.
Line 10: Line 10:
*a Cumulus Log already uploaded
*a Cumulus Log already uploaded


=IMPORTANT NOTE FOR VERSION 2.0=
=IMPORTANT NOTE FOR VERSION 2.0+=
Version 2.0 changes the SQL table structures from version 1.x. If you are currently using version 1.x and wish to upgrade, then you should DROP the existing tables and let the version 2 script recreate them. If this is unacceptable DO NOT UPGRADE, stay with version 1.x
Version 2.0 changes the SQL table structures from version 1.x. If you are currently using version 1.x and wish to upgrade, then you should DROP the existing tables and let the version 2 script recreate them. If this is unacceptable DO NOT UPGRADE, stay with version 1.x


Line 20: Line 20:


=Installation=
=Installation=
*Download the PHP script ... [http://wiki.sandaysoft.com/files/ImportCumulusFile_v2-6.txt (right click, Save as)] and then rename the .txt to .php
*Download the PHP script ... [http://wiki.sandaysoft.com/files/ImportCumulusFile_v3-0.txt (right click, Save as)] and then rename the .txt to .php
*Save the file and edit it using a text editor --  there are five entries to be edited
*Save the file and edit it using a text editor --  there are five entries to be edited
:servername, username, password, database and security key
:servername, username, password, database and security key
Line 75: Line 75:


= Version Control =
= Version Control =
*3.0 - 6 November 2016 [[http://wiki.sandaysoft.com/files/ImportCumulusFile_v3-0.txt Download]]
**Converted to use prepared statements - more efficient for bulk inserts (the main use for script with CumulusMX?)
**SQL injection protection improved - requires the table names to be defined in this script
*2.8 - 27 April 2015 [[http://wiki.sandaysoft.com/files/ImportCumulusFile_v2-8.txt Download]]
*2.8 - 27 April 2015 [[http://wiki.sandaysoft.com/files/ImportCumulusFile_v2-8.txt Download]]
**Added addtional configuration parameter $rainUnit, default is 'mm'
**Added addtional configuration parameter $rainUnit, default is 'mm'

Navigation menu