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

CloudBase script for Cumulus Ver CU1.5

Discussion of Ken True's web site templates

Moderator: saratogaWX

hrsfoto
Posts: 59
Joined: Thu 10 Oct 2013 2:44 am
Weather Station: Vantage Pro2
Operating System: Windows 7 pro
Location: Butte County California

Re: CloudBase script for Cumulus Ver CU1.5

Post by hrsfoto »

I cannot find the how to txt file to install the cloudbase script. I have downloaded the file but no file for installing CloudbaseCU15_Full.zip can be found

Any Ideas?
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

Apologies, missed the file from the Package
Now added to the package plus made the file available separately as well.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

hi BCJKiwi,

There is a time zone problem it not get the one from settings.php
http://99.37.53.247/weather/working/clo ... php?html=1
Beau

Code: Select all

// !!! YOU MUST SET/CHECK THESE SETTINGS !!!
$realtime      = '../cloudbaseCU.txt';  // install the supplied cloudbaseCUT.txt file into Cumulus to deliver this to your website
$metarICAO     = 'KSPI';               // change to suit your local Metar code
$tz            = 'Pacific/Auckland';   // NOTE: this *MUST* be set correctly to translate UTC/Webserver time to your LOCAL time.
   // http://us.php.net/manual/en/timezones.php has the list of timezone names. Pick the one that is closest to your location.
$pathToMetFile = './cache/';           // WITH TRAILING /  path to the Metar file
$pathToImages  = '../images/cb/';       // path to the background, cloud, windsock and scale images (with trailing slash)
$pathToMoonImages = '../images/cb/moon/';  // path to the moon phase images (with trailing slash)
// !!! YOU MUST SET/CHECK SETTINGS ABOVE !!!
if(!isset($_SESSION['timezone'])) {    // ONLY USE $tz setting above if timezone NOT already set (e.g. by Saratoga Template System)
   date_default_timezone_set($tz);}

Code: Select all

setting.php
<?php
error_reporting(E_ALL);
 ini_set("display_errors", 1);
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Base-USA template set)
############################################################################
#
#	Project:	Sample Included Website Design
#	Module:		Settings.php
#	Purpose:	Provides the Site Settings Used Throughout the Site
# 	Authors:	Kevin W. Reed <kreed@tnet.com>
#				TNET Services, Inc.
#
# 	Copyright:	(c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
############################################################################
#	This document uses Tab 4 Settings
############################################################################
//Version 1.01 - 28-Jul-2012 - added support for nws-alerts scripts
$SITE 			= array();

############################################################################
# Sitewide configuration - website style and features
############################################################################

$SITE['CSSscreen']		= 'weather-screen-blue-narrow.css'; // Default screen 800px design
//   Note: $SITE['CSSscreen'] will be overridden if the Theme Switch (below) is enabled.
//   To lock your site to use only one CSS as specified in $SITE['CSSscreen'], just
//   turn off the Theme Switcher.
$SITE['CSSprint']		= 'weather-print-php.css';
#
#$SITE['CSSscreen']		= 'weather-screen.css'; // Classic design
#$SITE['CSSprint']		= 'weather-print.css';

# Mike Challis' Theme Switch configuration
$SITE['allowThemeSwitch']   = false;  // set to false to disable the use of Theme Switcher 
$SITE['CSSscreenDefault'] = 'weather-screen-blue.css'; // leave -narrow or -wide off this .. just change color here
$SITE['CSSwideOrNarrowDefault'] = 'wide'; // 'narrow' or 'wide'
# CSSsettings_mode
# sets allowable user style select options:
# 1 user can select style and screen width (show style select and screen width select)
# 2 user can select styles only (hide screen width select)
# 3 user can select screen width only (hide style select)
$SITE['CSSsettings_mode'] = 1;  // set to 1, 2 or 3

$SITE['flyoutmenu'] = true; // set to false to use the menu list inside menubar.php instead

$SITE['charset']		= 'ISO-8859-1'; // default character set for webpages (iso-8859-1=latin)
#
# Multilanguage support 
#
$SITE['lang'] = 'en';                // default language for website to use
$SITE['allowLanguageSelect'] = false; // set to false to disable the use of language selector
$SITE['useLanguageFlags'] = false;    // true=show flags, false=show language 2-char abbreviations
$SITE['languageSelectDropdown'] = false; // true=show dropdown list for languages, false=show linear flags list
$SITE['languageSelectButton'] = false;  // true=show 'Set' button for language select, false=use onchange to submit
$SITE['langavail'] = array('en',       // select languages to offer here.  Use comments to remove languages
// array('en', should be first entry on line above
// other languages with the USA set can be enabled by installing language packs
//  'af',  // afrikaans
//  'ct', // 'catalan',
//  'dk', // 'danish',
//  'nl', // 'dutch',
//  'fi', // 'finnish',
//  'fr', // 'french',
//  'de', // 'german',
//  'el', // 'greek',
//  'it', // 'italian',
//  'no', // 'norwegian',
//  'pl', // 'polish',
// 'pt', // 'portuguese',
//  'es', // 'spanish',
//  'se', // 'swedish',
);
// if your software uploads almanac dates using a language OTHER THAN English, please put the month
// names in your language to replace the English ones below.  This is used primarily by the
// wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes
$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
// example:
//$SITE['monthNames'] = array(  // Danish for wxastronomy page .. replace with month names in your language
//'januar','februar','marts','april','maj','juni',
//'juli','august','september','oktober','november','december'
//);

############################################################################
# Sitewide configuration - Station location, identity and date/time info
############################################################################

$SITE['organ']			= 'Springfield, ILL, Weather';

$SITE['copyr']			= '&copy; ' . date("Y",time()) . ', Your Weather Website';
$SITE['location']       = 'Springfield, IL, USA';
$SITE['email']			= 'mailto:n9mfk9@gmail.com';
# Station location: latitude, longitude, cityname
$SITE['latitude']		= '39.706194';    //North=positive, South=negative decimal degrees
$SITE['longitude']		= '-89.631444';  //East=positive, West=negative decimal degrees
$SITE['cityname']		= 'Springfield';

$SITE['tz'] 			= 'America/Chicago'; //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.
//  http://us.php.net/manual/en/timezones.php  has the list of timezone names
//  pick the one that is closest to your location and put in $SITE['tz'] like:
//    $SITE['tz'] = 'America/Los_Angeles';  // or
//    $SITE['tz'] = 'Europe/Brussels';
// note: date format used for PHP parts only.  Weather software dates are not processed
// except on the astronomy page

//$SITE['timeFormat'] = 'D, d-M-Y g:ia T';  // Day, 31-Mar-2006 6:35pm Tz  (USA Style)
//$SITE['timeFormat'] = 'm/d/Y g:ia';      // USA  format 03/31/2006 14:03
//$SITE['timeFormat'] = 'd/m/Y H:i';       // Euro format 31/03/2006 14:03
//$SITE['timeFormat'] = 'Y-m-d H:i';       // ISO  format 2006-03-31 14:03
$SITE['timeFormat'] = 'D, d-M-Y H:i T';  // Day, 31-Mar-2006 6:35pm Tz  (USA Style)

//$SITE['timeOnlyFormat'] = 'g:ia';          // USA format h:mm[am|pm\
$SITE['timeOnlyFormat'] = 'H:i';          // Euro format hh:mm  (hh=00..23);
$SITE['dateOnlyFormat'] = 'd-M-Y';        // for 31-Mar-2008 or 'j/n/Y' for Euro format


############################################################################
# Sitewide configuration - support scripts configuration
############################################################################

###########################################################################
# These values should reflect the units-of-measure your weather station
# uses to report the weather data when processing weather tags.
# Note: if you change them here, make sure to make the corresponding
#   changes in the ajax[WXname]wx.js AJAX script also.
###########################################################################

$SITE['WDdateMDY'] = true; // for WD date format of month/day/year.  =false for day/month/year

$SITE['uomTemp'] = '&deg;F';  // ='&deg;C', ='&deg;F'
$SITE['uomBaro'] = ' inHg';    // =' hPa', =' mb', =' inHg'
$SITE['uomWind'] = ' mph';   // =' km/h', =' kts', =' m/s', =' mph'
$SITE['uomRain'] = ' in';     // =' mm', =' in'
$SITE['uomSnow'] = ' in';     // =' cm', =' in'
$SITE['uomDistance'] = ' miles';  // or ' km' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';
$SITE['uomHum'] = ' %';
//
$SITE['imagesDir'] = './ajax-images/';  // directory for ajax-images with trailing slash
// 
$SITE['cacheFileDir']   =  './cache/';   // directory to use for scripts cache files .. use './' for doc.root.dir
// 
$SITE['UVscript']		= 'get-UV-forecast-inc.php'; // worldwide forecast script for UV Index
//	comment out above line to exclude UV forecast from dashboard, gizmo and wxuvforecast.php page
//
// if you have WXSIM installed set $SITE['WXSIM'] = true; otherwise set it to false
$SITE['WXSIM']			= false;  // Set to false if you have not installed WXSIM
$SITE['WXSIMscript'] 	= 'plaintext-parser.php'; // script for decoding plaintext.txt into icons
$SITE['defaultlang']	= 'en';   // 'en' for English (WXSIM plaintext-parser.php)

# fcsturlNWS is the point-printable forecast URL from http://www.weather.gov/ (used by advforecast2.php)
$SITE['fcsturlNWS']		= 'http://forecast.weather.gov/MapClick.php?CityName=Springfield&state=IL&site=ILX&textField1=39.7814&textField2=-89.6447&e=0&TextType=2';
$SITE['fcsticonsdir'] = './forecast/images/'; // NOAA-style icons for NWS, WU, WXSIM forecast scripts
$SITE['fcsticonstype']= '.gif'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
 
// in the following section, enable settings for ONE primary forecast organization
// pick which script AND org are to be used for your forecast here: (last uncommented pair will
// be the ones used on the wxforecast.php page and in your dashboard and sidebar

$SITE['fcstscript']		= 'advforecast2.php';  // USA-only NWS Forecast script
$SITE['fcstorg']		= 'NWS';    // set to 'NWS' for NOAA NWS

$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.

"ILZ051|Springfield|http://forecast.weather.gov/MapClick.php?CityName=Springfield&state=IL&site=ILX&textField1=39.7814&textField2=-89.6447&e=0&TextType=2",
//"ILZ051|Chatham|http://forecast.weather.gov/MapClick.php?CityName=Chatham&state=IL&site=ILX&textField1=39.6729&textField2=-89.6971&e=0&TextType=2",
//"ILZ052|Taylorville|http://forecast.weather.gov/MapClick.php?CityName=Taylorville&state=IL&site=ILX&textField1=39.5215&textField2=-89.2622&e=0&TextType=2",
//"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
//"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
//"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
//"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
//"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
//"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
//"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",
);

// Uncomment the two lines below to use WXSIM as the ONLY forecast script to use
// $SITE['fcstscript']	= 'plaintext-parser.php';    // WXSIM forecast (if only forecast script)
// $SITE['fcstorg']		= 'WXSIM';    // set to 'WXSIM' for WXSIM forecast

// NOAA warning zone
$SITE['noaazone'] 		= 'ILZ051'; // used for NOAA advisories and advforecast2.php forecasts
$SITE['hurlURL']		= "wxadvisory.php"; // page to launch for details on NOAA advisories
// 

// NWS Alerts package configuration (for Curly's nws-alerts scripts)
// "Location|ZoneCode|CountyCode[|CountyCode]..."
// Note: if more than 4 zone/county codes are used, a message will appear if you are NOT using
//    cron to provide updates.
// Note: additional/optional nws-alerts configuration is in nws-alerts-config.php file
$SITE['NWSalertsCodes'] = array( 

   "Sangamon |ILZ051|ILC167",
 //"Santa Clara Valley|CAZ513|CAC085",
 //  "Santa Cruz Mtns|CAZ512|CAC081|CAC085|CAC087",
 //"Santa Cruz|CAZ529|CAC087",
//  "Monterey|CAZ530|CAC053",
//  "South/East Bay|CAZ508|CAC081",
//  "San Mateo Coast|CAZ509|CAC081",
//  "San Francisco|CAZ006|CAC075"
);
$SITE['NWSalertsSidebar'] = true; // =true to insert in menubar, =false no insert to menubar

$SITE['noaacounty'] = 'ILC167'; // NOAA county code 


// 

// Radar settings
$SITE['noaaradar']		= 'ILX';   		// LAST 3 characters of NOAA Radar Site ID
										// e.g. Radar KMUX has $SITE['noaaradar'] = 'ILX';
$SITE['WUregion']	= 'mw';				// Wunderground regional maps
// 'sw'=SouthWest, 'nw'=NorthWest, 'mw'=Midwest
// 'sp'=South Central, 'ne'=North East, 'se'=South East

// GRLevel3 Radar image settings (for wxgr3radar.php and radar-status.php scripts
$SITE['GR3radar']	= 'kmux';	// set to lower-case full name of NEXRAD radar site
$SITE['GR3DIR']		= '/GR3'; 	// set to directory for GRLevel3 images (or '.' for root directory
$SITE['GR3type']	= 'cr';		// radar image type 'cr','br','cr248','br1' etc.
$SITE['GR3img']		= 'jpg';	// GR3 image type 'jpg' or 'png'
$SITE['GR3cnt']		= 10;		// number of images in series 10=(_0 ... _9 in name of file)
$SITE['GR3width']	= 512;		// width of GR3 images
$SITE['GR3height']  = 512;		// height of GR3 images
$SITE['showradarstatus'] = false; // set to false to suppress 'active' message by radar-status.php

##########################################################################
# end of configurable settings
##########################################################################
# Multilanguage support constants - please do NOT change the settings below
#DO NOT CHANGE THESE SETTINGS
$SITE['installedLanguages'] = array (
  'af' => 'Afrikaans',
  'bg' => '&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080; &#1077;&#1079;&#1080;&#1082;',
  'ct' => 'Catal&agrave;',
  'dk' => 'Dansk',
  'nl' => 'Nederlands',
  'en' => 'English',
  'fi' => 'Suomi',
  'fr' => 'Fran&ccedil;ais',
  'de' => 'Deutsch',
  'el' => '&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;',
  'ga' => 'Gaeilge',
  'hu' => 'Magyar',
  'it' => 'Italiano',
  'no' => 'Norsk',
  'pl' => 'Polski',
  'pt' => 'Portugu&ecirc;s',
  'ro' => 'limba rom&#00226;n&#00259;',
  'es' => 'Espa&ntilde;ol',
  'se' => 'Svenska',
);
# DO NOT CHANGE THESE SETTINGS
$SITE['ISOLang'] = array ( // ISO 639-1 2-character language abbreviations from country domain 
  'af' => 'af',
  'bg' => 'bg',
  'ct' => 'ca',
  'dk' => 'da',
  'nl' => 'nl',
  'en' => 'en',
  'fi' => 'fi',
  'fr' => 'fr',
  'de' => 'de',
  'el' => 'el',
  'ga' => 'ga',
  'it' => 'it',
  'hu' => 'hu',
  'no' => 'no',
  'pl' => 'pl',
  'pt' => 'pt',
  'ro' => 'ro',
  'es' => 'es',
  'se' => 'sv',
);
# DO NOT CHANGE THESE SETTINGS
$SITE['langCharset'] = array( // for languages that DON'T use ISO-8859-1 (latin) set
 'bg' => 'ISO-8859-5',
 'el' => 'ISO-8859-7',
 'hu' => 'ISO-8859-2',
 'ro' => 'ISO-8859-2',
 'pl' => 'ISO-8859-2',
 'ru' => 'UTF-8',
 'gr' => 'UTF-8'
);
# DO NOT CHANGE THESE SETTINGS
$SITE['WULanguages'] = array ( // for WeatherUnderground forecast supported languages
  'af' => 'afrikaans',
  'bg' => 'bulgarian',
  'ct' => 'catalan',
  'dk' => 'danish',
  'nl' => 'dutch',
  'en' => 'english',
  'fi' => 'finnish',
  'fr' => 'french',
  'de' => 'deutsch',
  'el' => 'greek',
  'ga' => 'gaelic',
  'hu' => 'hungarian',
  'it' => 'italian',
  'no' => 'norwegian',
  'pl' => 'polish',
  'pt' => 'portuguese',
  'ro' => 'romanian',
  'es' => 'espanol',
  'se' => 'swedish',
);
# End - multilanguage support constants
# Now prune the installedLanguages based on langavail selection
$tarray = array(); 
foreach ($SITE['langavail'] as $n => $k) {
  if(isset($SITE['installedLanguages'][$k])) {
    $tarray[$k] = $SITE['installedLanguages'][$k];
  }
}
$SITE['installedLanguages'] = $tarray;
# end prune the installedLanguages based on langavail selection
#
# set the Timezone abbreviation automatically based on $SITE['tzname'];
# Set timezone in PHP5/PHP4 manner
  if (!function_exists('date_default_timezone_set')) {
	 putenv("TZ=" . $SITE['tz']);
//	 print "<!-- using putenv(\"TZ=". $SITE['tz']. "\") -->\n";
    } else {
	 date_default_timezone_set($SITE['tz']);
//	 print "<!-- using date_default_timezone_set(\"". $SITE['tz']. "\") -->\n";
   }

$SITE['tzname']	= date("T",time());
if($SITE['allowThemeSwitch']) {
  # begin Color Theme Switcher Plugin by Mike Challis
  # http://www.642weather.com/weather/scripts.php
  include_once('include-style-switcher.php');
  $SITE['CSSscreen'] = validate_style_choice();
  # end Color Theme Switcher Plugin
} else {
  session_start(); // for preservation of language settings.
  if ($SITE['CSSwideOrNarrowDefault'] == 'wide') {
          $_SESSION['CSSwidescreen'] = 1;
          $CSSstyle = str_replace ('.css','-wide.css',$SITE['CSSscreenDefault']);
  } else {
          $_SESSION['CSSwidescreen'] = 0;
          $CSSstyle = str_replace ('.css','-narrow.css',$SITE['CSSscreenDefault']);
  }
  $SITE['CSSscreen'] = $CSSstyle;
}
# Automatic Info we might need
############################################################################
if(isset($_SERVER['REMOTE_ADDR']))   {$SITE['REMOTE_ADDR']	= $_SERVER['REMOTE_ADDR'];}
if(isset($_SERVER['REMOTE_HOST']))   {$SITE['REMOTE_HOST']	= $_SERVER['REMOTE_HOST'];}
if(isset($_SERVER['DOCUMENT_ROOT'])) {$SITE['WEBROOT']		= $_SERVER['DOCUMENT_ROOT'];}
if(isset($_SERVER['REQUEST_URI']))   {$SITE['REQURI']		= $_SERVER['REQUEST_URI'];}
if(isset($_SERVER['SERVER_NAME']))   {$SITE['SERVERNAME']	= $_SERVER['SERVER_NAME'];}
$SITE['remote']			= "onclick=\"window.open(this.href,'_blank');return false;\"";
$SITE['PHPversion'] = phpversion();
// default settings needed for various pages when the weather software plugin is not installed.
// do not change these
$SITE['WXsoftwareURL'] = '#';
$SITE['WXsoftwareLongName'] = '(unspecified)';
$SITE['WXtags'] = '';
# now fetch the weather software settings if it exists
if(isset($_REQUEST['wx']) and file_exists('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php')) {
	include_once('Settings-weather-'.strtoupper($_REQUEST['wx']).'.php');
} elseif(file_exists("Settings-weather.php")) { 
    include_once("Settings-weather.php"); 
}
?>

BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

We have discussed this extensively via PM.
You are the only one I am aware of having this issue.

You have modified the program
Your webserver was not configured properly when we last corresponded.
You have not indicated that you have followed any of the recommendations offered.

What happens if you run a standard version of the script in a properly configured webserver?????.

Sorry, but you are on your own as I am unable to offer any further assistance for your unique modified setup.
User avatar
SpaceWalker
Posts: 67
Joined: Sun 04 Mar 2012 2:54 am
Weather Station: Davis Vantage
Operating System: Windows XP
Location: Eastern-Canada
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by SpaceWalker »

Beau, how about replacing these lines:

Code: Select all

if(!isset($_SESSION['timezone'])) {
   date_default_timezone_set($tz);}
with these lines:

Code: Select all

if ( file_exists( 'Settings.php' )) { include_once ( 'Settings.php' ); }
global $SITE;
if ( isset ( $SITE['tz'] )) { $tz = $SITE['tz']; }
if ( isset ( $SITE['conditionsMETAR'] )) { $metarICAO = $SITE['conditionsMETAR']; }
//
if ( function_exists( 'date_default_timezone_set' )) {
  date_default_timezone_set( $tz );
} else {
  putenv( "TZ=" . $tz );
}
Over the years, I have found the global variable '$_SESSION' to be quite unreliable - I manage more than half dozen of servers (both private and public) and the global variable '$_SESSION' is only 'usable' on one server.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

http://99.37.53.247/phpinfo.php

Hi, i have the timezone set correctly on my server and I am using your latest update script unchanged
BCJKiwi wrote:We have discussed this extensively via PM.
You are the only one I am aware of having this issue.

You have modified the program
Your webserver was not configured properly when we last corresponded.
You have not indicated that you have followed any of the recommendations offered.

What happens if you run a standard version of the script in a properly configured webserver?????.

Sorry, but you are on your own as I am unable to offer any further assistance for your unique modified setup.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

After some test this works great or you can set tz to = ' '
SpaceWalker wrote:Beau, how about replacing these lines:

Code: Select all

if(!isset($_SESSION['timezone'])) {
   date_default_timezone_set($tz);}
with these lines:

Code: Select all

if ( file_exists( 'Settings.php' )) { include_once ( 'Settings.php' ); }
global $SITE;
if ( isset ( $SITE['tz'] )) { $tz = $SITE['tz']; }
if ( isset ( $SITE['conditionsMETAR'] )) { $metarICAO = $SITE['conditionsMETAR']; }
//
if ( function_exists( 'date_default_timezone_set' )) {
  date_default_timezone_set( $tz );
} else {
  putenv( "TZ=" . $tz );
}
Over the years, I have found the global variable '$_SESSION' to be quite unreliable - I manage more than half dozen of servers (both private and public) and the global variable '$_SESSION' is only 'usable' on one server.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

Been there done that.
All the variants I have used and tested worked for everyone but Beau.

The question is;
Why is Beau the only one with the problem? Are there any others among you that currently have this issue that I have not heard from?

As I have advised Beau - repeatedly - all this is irrelevant and is only there for info about the metar refresh times for the ?html=1 output. The time zone settings have no effect on the function of the script as all the code used is in seconds relative to the Unix Epoch.
User avatar
PaulMy
Posts: 3776
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by PaulMy »

Are there any others among you that currently have this issue that I have not heard from?
I have the latest version installed and see no issue.

Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

The one question I have is if your are using the ken timplate should $tz = ' '
in the script because if it is set that is the time zone used

if anyone wood like tolok at my php settings they can be foud here http://99.37.53.247/weather/phpinfo.php
Beau
User avatar
PaulMy
Posts: 3776
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by PaulMy »

My Saratoga template Settings.php is $SITE['tz'] = 'America/Toronto'; //NOTE: this *MUST* be set correctly
My settings in cloudbaseCU.php is $tz = 'America/Toronto'; // NOTE: this *MUST* be set correctly

Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

Ok I was my understanding that it wood use tz from the Saratoga template
but now i see that it only does that if $tz = ' '; in the script
Beau
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

OK Guys, give it a rest.

No one but Beau has a problem.

I have rewritten the script to get rid of all the tz stuff so none of this will be there in the next release.

Can we all stop wasting time and energy on it please.
User avatar
SpaceWalker
Posts: 67
Joined: Sun 04 Mar 2012 2:54 am
Weather Station: Davis Vantage
Operating System: Windows XP
Location: Eastern-Canada
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by SpaceWalker »

In case no one has noticed, Beau is running the scripts on a local computer running under XAMPP for Windows.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

Yes I do know.
Post Reply