Author Topic: Yet another ajax-dashboard not included thread!  (Read 2416 times)

0 Members and 1 Guest are viewing this topic.

Offline benfleetweather

  • Member
  • *
  • Posts: 5
    • Benfleet Weather
Yet another ajax-dashboard not included thread!
« on: December 19, 2015, 01:18:37 PM »
Hi guys,

Joined up to the forum a few weeks ago after wanting to change my website to a new template, and decided on Saratoga Weather templates.

After spending 3 hours fixing 3 issues I had (timezone) something else related to that, an issue with and top.php, I've stumbled on the most infuriating one yet, the dreaded "Note: ajax-dashboard not included since weather station not yet specified."

Been fiddling with files for the last 4 hours and still haven't got anywhere, Cumulus is set up correctly, the CUtags.txt file uploads into the website root folder, I've also got realtime.txt uploading there temporarily until I take the site live.

I've tried changing the wxindex.php to index.php, added

#
##########################################################################
# end of configurable settings
#
#---------------------------------------------------------------------------
# do NOT change these settings below
$SITE['WXsoftware']     = 'CU';
$SITE['WXsoftwareURL']  = 'http://sandaysoft.com/products/cumulus';
$SITE['WXsoftwareLongName'] = 'Cumulus';
$SITE['ajaxDashboard']  = 'ajax-dashboard.php';
$SITE['trendsPage']     = 'CU-trends-inc.php'; // CU-specific trends page
$SITE['showSnow']   = false;   // do not toggle snow panel.. Snow depth will be displayed if available
$SITE['showSnowTemp']    = -60;     // disabled feature for Cumulus

?>

to the bottom of settings-weather.php (as it wasn't included on this page: http://saratoga-weather.org/wxtemplates/Settings-config-Cumulus.php

I found it inside the Cumulus software plugin download instead.

Checked and rechecked settings.php and can't so far see anything out of the ordinary

I've also searched the forums for the same issue and found many threads, but everything I've tried from the threads doesn't seem to work for me

The site is http://www.benfleetweather.uk/New/wxindex.php

If anyone could assist that would be great :)

Thanks

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #1 on: December 19, 2015, 02:37:46 PM »
There's a small issue with your Settings-weather.php -- it has some odd (likely UTF-8 characters in it) that is causing it to blow-up when PHP tries to parse it
Code: [Select]
<?php
#---------------------------------------------------------------------------
#  required settings for Cumulus software
#---------------------------------------------------------------------------
$SITE['WXtags']        = 'CUtags.php';    // for weather variables
$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
$SITE['realtimefile']   = 'realtime.txt';  // directory and name of Cumulus realtime.txt file
$SITE['graphImageDir']  = 'images/';     // directory location for graph images with trailing /
#---------------------------------------------------------------------------
# For NOAA reports
$SITE['NOAAdir']        = './Reports/';   // relative location of the NOAA report files
# Weather Station sensors and options for dashboard
$SITE['conditionsMETAR'] = 'EGMC';  // set to nearby METAR for current conditions icon/text
#   comment out conditionsMETAR if no nearby METAR.. conditions icon/text will not be displayed
$SITE['overrideRain']   = true// =true then rain rate will set rain words instead of METAR rain words
#                               // =false - no change to METAR rain words (station rain rate not used)
#
#
$SITE['feelslike']      = 2;     // =0 use HeatIndex, =1 use Humidex, =2 use Apparent Temperature
$SITE['DavisVP']    = true;  // set to false if not a Davis VP weather station
$SITE['UV']        = true;  // set to false if no UV sensor
$SITE['SOLAR']        = true;  // set to false if no Solar sensor
#
########################​########################​########################​##
# end of configurable settings
#
// do NOT change these
$SITE['WXsoftware'] = 'CU';
$SITE['WXsoftwareURL'] = 'http://http://sandaysoft.com/products/cumulus';
$SITE['WXsoftwareLongNam​e'] = 'Cumulus';
$SITE['ajaxDashboard'] = './ajax-dashboard.php';
$SITE['trendsPage'] = 'CU-trends-inc.php'// 
?>
​

I'd suggest unzipping a fresh copy from the CU-plugin.zip, customizing it using ANSI format in Notepad, then uploading it again.
It is important for you to use an ASCII (not a UTF-8 editor) when working on the Settings files :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline benfleetweather

  • Member
  • *
  • Posts: 5
    • Benfleet Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #2 on: December 19, 2015, 02:54:37 PM »
Hello!

Thanks for the quick response I will try the suggestion now :)

I have been using Expression Web 4 for editing, but did see earlier in a thread that the software can play around with php files?

I think your suggestion in the thread was to use either Dreamweaver CS4 or notepad++ so will have a look at these :)

EDIT: I also used the 'Auto' transfer type to upload files via Filezilla, which also may have caused the issue?
« Last Edit: December 19, 2015, 02:57:56 PM by benfleetweather »

Offline benfleetweather

  • Member
  • *
  • Posts: 5
    • Benfleet Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #3 on: December 19, 2015, 03:05:54 PM »
Downloaded the settings-weather.php from the Cumulus plugin folder, and edited inside notepad,

Changed the DavisVP/ UV and Solar outputs to false, must had of undone them changes earlier accidentally before uploading!

Saved in notepad with ANSI format, but still have the same ajax issue, have the odd characters changed in the script? :)

EDIT: re uploaded the settings-weather.php file with ASCII transfer type, no change  :???:
« Last Edit: December 19, 2015, 03:13:54 PM by benfleetweather »

Offline gluepack

  • Contributor
  • ***
  • Posts: 101
    • Jerbils' Weather Site
Re: Yet another ajax-dashboard not included thread!
« Reply #4 on: December 19, 2015, 04:33:52 PM »

Since that error message is only produced if it fails to find the site variable ajax-dashboard or the file that is specified there and Settings-weather.php, wxindex.php and ajax-dashboard.php are all in the same directory...
Remove the ./ from in front of ajax-dashboard.php in the variable definition of ajax-dashboard at around line 76 in your Settings-weather.php and see if that resolves it.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #5 on: December 19, 2015, 04:38:21 PM »
Since you're on a Linux server, the file 'setting-weather.php' is NOT the same as the required 'Settings-weather.php' file -- the upper/lower case matters in Linux (not so in Windows).

Editing using notepad++ is my recommendation -- I use it also.  Just make sure to edit the template files using ASCII mode, and not UTF-8.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #6 on: December 19, 2015, 04:45:05 PM »
Also, you seem to have truncated the Settings.php file
Code: [Select]
##########################################################################
# end of configurable settings
##########################################################################
?>
which should have
Code: [Select]
##########################################################################
# end of configurable settings
##########################################################################
#
if(file_exists("Settings-language.php")) { include_once("Settings-language.php"); }
  else { //  use defaults built-in
# Multilanguage support constants - please do NOT change the settings below
# DO NOT CHANGE THESE SETTINGS
$SITE['installedLanguages'] = array (
  'af' => 'Afrikaans',
  'bg' => 'български език',
  '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;ά',
  'ga' => 'Gaeilge',
  'hu' => 'Magyar',
  'it' => 'Italiano',
  'no' => 'Norsk',
  'pl' => 'Polski',
  'pt' => 'Portugu&ecirc;s',
  'ro' => 'limba română',
  '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
  } // end use default language specs
#
# 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");
}
?>
there.  that's the cause of the issue you are seeing.

You also appear to have trimmed stuff from the top of the file.  You should have at least
Code: [Select]
<?php
$SITE 
= array();

############################################################################
# Sitewide configuration - website style and features
############################################################################
at the start
« Last Edit: December 19, 2015, 04:53:10 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline benfleetweather

  • Member
  • *
  • Posts: 5
    • Benfleet Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #7 on: December 20, 2015, 09:59:02 PM »
Thanks guys for the new replies, just woke up and will try all of this now!  :grin:

Offline benfleetweather

  • Member
  • *
  • Posts: 5
    • Benfleet Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #8 on: December 21, 2015, 01:31:39 AM »
Hi again,

Went through all of the above earlier this morning but still had the same issue, so decided to start from scratch.

One thing I did notice when setting up again was that my CUtags file was in the web folder and not web files, not sure if that made a difference, but the ajax dashboard is now finally working!

I do have a few small issues through still, mainly below

Warning: Invalid argument supplied for foreach() in /websites/123reg/LinuxPackage21/be/nf/le/benfleetweather.uk/public_html/New/get-USNO-sunmoon.php on line 359

Warning: Invalid argument supplied for foreach() in /websites/123reg/LinuxPackage21/be/nf/le/benfleetweather.uk/public_html/New/get-USNO-sunmoon.php on line 368

These seem to disappear whenever I upload settings.php to the server, but reappear straight after a page refresh, reading on the forums I remember someone talking about a cache issue, so cleared that but nothing changed, since put the cache files back.

This is the script in question

$Data = array();

$useDateFormat = $useMDY?"m/d/Y":"d/m/Y";
$dateprior = date($useDateFormat,strtotime("-1 day"));
$datenow   = date($useDateFormat);
$datenext  = date($useDateFormat,strtotime("+1 day"));

$mtype = 'sun';
foreach ($MoonJSON['sundata'] as $n => $d) {
   $mt = $mtype . $phen_lookup[$d['phen']];
   if(preg_match('|civil|i',$mt)) {
      $mt = $phen_lookup[$d['phen']]; // no 'sun' in civil entries
   }
   $Data[$mt] = $d['time'];
   $Data[$mt.'date'] = $datenow;
}
$mtype = 'moon';
foreach ($MoonJSON['moondata'] as $n => $d) {
   $mt = $mtype . $phen_lookup[$d['phen']];
   $Data[$mt] = $d['time'];
   $Data[$mt.'date'] = $datenow;
}

$mtype = 'moon';
if(isset($MoonJSON['nextmoondata']) ) {
  foreach ($MoonJSON['nextmoondata'] as $n => $d) {
   $mt = $mtype . $phen_lookup[$d['phen']] . 'next';
   $Data[$mt] = $d['time'];
   $Data[$mt.'date'] = $datenext;
  }
}

$mtype = 'moon';
if(isset($MoonJSON['prevmoondata']) ) {
  foreach ($MoonJSON['prevmoondata'] as $n => $d) {
   $mt = $mtype . $phen_lookup[$d['phen']] . 'prior';
   $Data[$mt] = $d['time'];
   $Data[$mt.'date'] = $dateprior;
  }
}

After some forum browsing I tried ?force=1 on the homepage and that clears it up, but the standard homepage still has the issue


Also, after a specific amount of seconds (haven't counted) the page stops updating, and the second counter keeps rising, is there a way to stop that?

Thanks again for any help :)
« Last Edit: December 21, 2015, 02:09:28 AM by benfleetweather »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #9 on: December 21, 2015, 10:19:42 AM »
The issue with the sun/moon is caused by your entries in Settings.php of
Code: [Select]
$SITE['latitude']        = '';    //North=positive, South=negative decimal degrees
$SITE['longitude']        = '';  //East=positive, West=negative decimal degrees

You need to have them be your real latitude/longitude for the script to work.  Something like my default settings of
Code: [Select]
$SITE['latitude'] = '37.27153397';    //North=positive, South=negative decimal degrees
$SITE['longitude'] = '-122.02274323';  //East=positive, West=negative decimal degrees
.. note that the + (plus sign) is omitted from positive values in the settings.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Scobey

  • Member
  • *
  • Posts: 27
    • Scobey's Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #10 on: July 28, 2023, 11:36:59 PM »
Note: ajax-dashboard not included since weather station not yet specified.

help!

scoblic.net/wd/wxindex.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #11 on: July 28, 2023, 11:51:50 PM »
In your Settings-weather.php you have
Code: [Select]
$SITE['ajaxDashboard'] = 'ajax-dashboard.php6'; and it should be
Code: [Select]
$SITE['ajaxDashboard'] = 'ajax-dashboard6.php'; to enable the alternative dashboard.  The stock dashboard uses
Code: [Select]
$SITE['ajaxDashboard'] = 'ajax-dashboard.php';
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Scobey

  • Member
  • *
  • Posts: 27
    • Scobey's Weather
Re: Yet another ajax-dashboard not included thread!
« Reply #12 on: July 29, 2023, 01:40:50 AM »
Thanks

if i remember right this is why i quit using Saratoga-Weather.

I downloaded the file again and reinstalled ajax dashboard 6.

any fast fix for this mess?

scoblic.net/wd/wxindex.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Yet another ajax-dashboard not included thread!
« Reply #13 on: July 29, 2023, 10:07:51 AM »
Sure, just make sure you've uploaded ALL the files/directories from the alternative dashboard .zip file to your website, and do any needed configuration as shown in the Scotts-SetupInstructions-altdashboard695.pdf and the two README files.  You're missing all the new images in ./ajax-images and the subdirectories on your site.  The alternative dashboard has a large number of settings options and can be difficult to set up -- that's why I have it as optional and only include ajax-dashboard.php in the stock distribution.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP