Page 1 of 1

Import Cumulus File Problem

Posted: Tue 10 Mar 2015 11:37 am
by MeteoBisignano
Now I have solved the above error please inserivo '........'; Now I do not return errors but the following warning:


Error: You must supply a 'file' parameter / value

This is the part of the code to be changed:


// You must pass several options with your URL ...
// They can be in any order but the first one must start with? other with &
//
$Type = 'dayfile';
// This must be either the phrase dayfile, monthly, or realtime
//
$File = 'dayfile.txt';
// The location on your webserver, related to this script location, of your Cumulus File
// Example file = dayfile.txt or file = .. / data / dayfile.txt
//
$Table = "./ forbbiden /";
// Within the SQL table to import the data. If it does not exist the script will create it
//
// Key = xxxxx
// A security key, unique to you, to pass as part of the URL. This stops others from
// Running the script on your server if the do not know the key.
//
// RetainVal = nnn [optional]
// The elapsed of 'retainUnit's to keep in the table realtime. Records older than nnnUnits will be deleted.
//
// RetainUnit = xxxx [optional, mandatory if retainVal supplied]
// The units to be applied to retainVal, valid values ​​are: second, minute, hour, day, week, month, quarter, or year
//
// Example URLs ...
// htp://www.myserver.com/ImportCumulusFil ... ayfile.txt
// htp://www.myserver.com/ImportCumulusFil ... t12log.txt
// htp://www.myserver.com/ImportCumulusFil ... nUnit=hour
//
// COMMAND LINE
// It is possible to run this anche script from a PHP command line, eg via a cron job on Linux, or a scheduled task in Windows.
// Example of a 'Windows' command line ...
Php // importcumulusfile.php file = realtime.txt table = Realtime type = realtime key = letmein retainVal = 48 = retainUnit hour
//


My dayfile.txt is loaded into the root of the site but can not read it
Thanks Mark and I'm sorry for the inconvenience

Re: Import Cumulus File Problem

Posted: Tue 10 Mar 2015 10:38 pm
by mcrossley
The script is designed to be passed the file name, table name etc as parameters rather than hard coding them in the script. See the examples in the comments at the beginning of the file for calling the script using HTTP or from the command line.

Re: Import Cumulus File Problem

Posted: Sun 15 Mar 2015 10:53 am
by MeteoBisignano
mcrossley wrote:The script is designed to be passed the file name, table name etc as parameters rather than hard coding them in the script. See the examples in the comments at the beginning of the file for calling the script using HTTP or from the command line.

it work THANKS TO ALL :clap: :clap: :clap: :groan: :lol:

Re: Import Cumulus File Problem

Posted: Sun 15 Mar 2015 10:56 am
by MeteoBisignano
MeteoBisignano wrote:
mcrossley wrote:The script is designed to be passed the file name, table name etc as parameters rather than hard coding them in the script. See the examples in the comments at the beginning of the file for calling the script using HTTP or from the command line.

Now I'd like to translate $tomorrowdaylength in Italian!!Could you help me in this Mark?