Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Are you interested in a AJAX/PHP template set for Cumulus, .

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by saratogaWX »

nitrx wrote:For some reason the graphs are not showing up :cry: still in progress http://www.apeldoorn.tk/weer/wxindex.php :D
I think it's my bad... try changing the code in wxgraphs.php from

Code: Select all

		print "<img src=\"$graphImageDir.$imagename\" alt=\"$alttext\" width=\"$width\" height=\"$height\" />\n";
to

Code: Select all

		print "<img src=\"$graphImageDir$imagename\" alt=\"$alttext\" width=\"$width\" height=\"$height\" />\n";
Best regards,
Ken
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by nitrx »

Thanks thats the trick,

other issues asked on the wxforum ,

Thanks !
Ron
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by saratogaWX »

Got some minor corrections that have cropped up based on issues discovered and reported:

You can download a fresh copy of the Base that you used for the install, and then replace the following pages in your installation with copies from the distribution .zip:


top.php
common.php
wxgraphs.php
wxlinks.php
wxastronomy.php


For the Base-USA folks, also replace:

get-nnvl-iod.php

For the Base-Canada folks, also replace:

ec-forecast.php

All those updates address Notice: messages when error_reporting(E_ALL) is enabled.

I also suggest you modify your current Settings.php to replace

Code: Select all

# Automatic Info we might need
############################################################################
$SITE['REMOTE_ADDR']	= $_SERVER['REMOTE_ADDR'];
$SITE['REMOTE_HOST']	= $_SERVER['REMOTE_HOST'];
$SITE['WEBROOT']		= $_SERVER['DOCUMENT_ROOT'];
$SITE['REQURI']			= $_SERVER['REQUEST_URI'];
$SITE['SERVERNAME']		= $_SERVER['SERVER_NAME'];
with

Code: Select all

# 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['PHPversion'] = phpversion();
which addresses some Notice: errata if your particular server doesn't propagate a particular server-side variable.

Best regards,
Ken

BTW.. the main thread for discussing the Beta of the templates is on WXforum.net at http://www.wxforum.net/index.php?topic=10342.new#new
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by gemini06720 »

Ken, I have stayed up late (much later than usual) and I have installed the canadian multilingual version running for the time being under Cumulus.

I have encountered a few script problems that I have corrected - I should have taken notes of the corrections and report them to you... :oops: ...but having work with similar templates before, it was easy to find my way through.

I am still having problems with the Environment Canada radar, but I understand that a modified script has been released - I had already adapted the Weather Display script for Environment Canada to my Cumulus pages and was about to use that script... :)

Just in case you have a few minutes, you could have a look at what I have done so far to the [link removed] pages. Just in case you are somewhat curious, here are my [link removed] pages.

I do not know whom has updated the french translation ... but the translation is quite poor ... english words cannot simply translated to their french equivalent, the context has to be taken into account. I know the french translations were originally made by Brian Ellis (and his wife Catrina Imhoof), and I did quite a bit of updating when I worked on the canadian bilingual templates, but some of the newer textes that have been added must have been translated by someone from the province of Ontario or Quebec... :evil:

OK, now that I have something going, I am going to take a few hour of sleep... :mrgreen:
Last edited by gemini06720 on Wed 22 May 2013 10:14 pm, edited 1 time in total.
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: Are you interested in a AJAX/PHP template set for Cumulu

Post by n9mfk »

Hi all,
I need some help
here the setup xampp on a windows pc
all page work except
wxgraphs.php


Server error.

The website encountered an error while retrieving http://192.168.1.4/wxgraphs.php. It may be down for maintenance or configured incorrectly.

Here are some suggestions:
Reload this web page later.
More information on this error
Below is the original error message

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

Code: Select all

<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   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
############################################################################
require_once("Settings.php");
require_once("common.php");
############################################################################
$TITLE= $SITE['organ'] . " - " . langtransstr("Trend Graphs");
$showGizmo = true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>
</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
$graphImageDir = './';
if(isset($SITE['graphImageDir'])) {$graphImageDir = $SITE['graphImageDir']; }
?>

<div id="main-copy">
  
	<h1><?php langtrans('Weather Trend Graphs'); ?></h1>
    <?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] <> '') { // have software defined ?> 
    <p><?php print langtrans('Graphs generated by')." ".$SITE['WXsoftwareLongName']." "; ?>
	<?php if(isset($wdversion)) {echo " (".$wdversion.")";} ?></p>
    <?php } else { // software not defined yet ?>
    <p>&nbsp;</p>
    <p>Weather software not specified in configuration.</p>
    <?php } // end software not defined yet ?>
    
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WL') { // WeatherLink graph names ?>
    <h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
	<?php genImageLink('OutsideTempHistory.gif','Temperature'); ?>
    <?php genImageLink('OutsideHumidityHistory.gif','Humidity'); ?>
    <br />
    <?php genImageLink('DewPointHistory.gif','Dew Point'); ?>
    <?php genImageLink('THWHistory.gif','THW Index'); ?>
    <br />
    <?php genImageLink('WindChillHistory.gif','Wind Chill'); ?>
    <?php genImageLink('HeatIndexHistory.gif','Heat Index'); ?>
    <br />
    <h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
    <?php genImageLink('WindSpeedHistory.gif','Wind Speed'); ?>
    <?php genImageLink('WindDirectionHistory.gif','Wind Direction'); ?>
    <br />
    <?php genImageLink('HiWindSpeedHistory.gif','High Wind Speed'); ?>
    <?php genImageLink('BarometerHistory.gif','Barometer'); ?>
    <br />
    <h2><?php langtrans('Rain'); ?></h2>
    <?php genImageLink('RainHistory.gif','Rain'); ?>
    <?php genImageLink('RainRateHistory.gif','Rain Rate'); ?>
    <br />
    <?php // figure out to display solar and/or UV based on site settings
	if($SITE['SOLAR'] and $SITE['UV']) { // have both sensors ?>
    <h2><?php echo langtransstr('Solar Radiation') . ' / ' . langtransstr('UV Index'); ?></h2>
    <?php genImageLink('SolarRadHistory.gif','Solar Radiation'); ?>
    <?php genImageLink('UVHistory.gif','UV Index'); ?>
    <? } elseif ($SITE['SOLAR']) { ?>
     <h2><?php echo langtransstr('Solar Radiation'); ?></h2>
    <?php genImageLink('SolarRadHistory.gif','Solar Radiation'); ?>
    <? } elseif ($SITE['UV']) { ?>
     <h2><?php echo langtransstr('UV Index'); ?></h2>
    <?php genImageLink('UVHistory.gif','UV Index'); ?>
    <? } // end solar/uv selection ?>
    
<?php } // end WeatherLink graph names    ?>

<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'VWS') { // VWS graph names ?>
     <h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
    <?php genImageLink('vws742.jpg','Temperature'); ?>
    <?php genImageLink('vws740.jpg','Humidity'); ?>
    <br />
    <?php genImageLink('vws757.jpg','Dew Point'); ?>
    <?php genImageLink('vws2811.jpg','THW Index'); ?>
    <br />
    <?php genImageLink('vws754.jpg','Wind Chill'); ?>
    <?php genImageLink('vws756.jpg','Heat Index'); ?>
    <br />
    <h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
    <?php genImageLink('vws737.jpg','Wind Speed'); ?>
    <?php genImageLink('vws736.jpg','Wind Direction'); ?>
    <br />
    <?php genImageLink('vws1325.jpg','High Wind Speed'); ?>
    <?php genImageLink('vws758.jpg','Barometer'); ?>
    <br />
    <h2><?php langtrans('Rain'); ?></h2>
    <?php genImageLink('vws744.jpg','Rain'); ?>
    <?php genImageLink('vws859.jpg','Rain Rate'); ?>
    <br />
    <?php // figure out to display solar and/or UV based on site settings
	if($SITE['SOLAR'] and $SITE['UV']) { // have both sensors ?>
    <h2><?php echo langtransstr('Solar Radiation') . ' / ' . langtransstr('UV Index'); ?></h2>
    <?php genImageLink('vws753.jpg','Solar Radiation'); ?>
    <?php genImageLink('vws752.jpg','UV Index'); ?>
    <? } elseif ($SITE['SOLAR']) { ?>
     <h2><?php echo langtransstr('Solar Radiation'); ?></h2>
    <?php genImageLink('vws753.jpg','Solar Radiation'); ?>
    <? } elseif ($SITE['UV']) { ?>
     <h2><?php echo langtransstr('UV Index'); ?></h2>
    <?php genImageLink('vws752.jpg','UV Index'); ?>
    <? } // end solar/uv selection ?>
<?php } // end VWS graph names    ?>

<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'CU') { // Cumulus graph names ?>
   <h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
  <?php genImageLink('temp.png','Temperature',620,248); ?>
  <br />
  <?php genImageLink('hum.png','Humidity',620,248); ?>
  <br />
  <h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
  <?php genImageLink('wind.png','Wind Speed',620,248); ?>
  <br />
  <?php genImageLink('windd.png','Wind Direction',620,248); ?>
  <br />
  <?php genImageLink('press.png','Barometer',620,248); ?>
  <br />
  <h2><?php langtrans('Rain'); ?></h2>
  <?php genImageLink('raint.png','Rain',620,248); ?>
  <br />
  <?php genImageLink('rain.png','Rain Rate',620,248); ?>
  <br />
<?php } // end VWS graph names    ?>

<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WD') { // Weather-Display graph names ?>
	<h1><?php langtrans('Last 24 Hours'); ?></h1> 
		<?php genImageLink('curr24hourgraph.gif','Last 24 hours',469,555); ?>
	<br /><br />
	<h1><?php langtrans('Last 72 Hours'); ?></h1> 
		<?php genImageLink('curr72hourgraph.gif','Last 72 hours',469,555); ?>
	<br /><br />
	<h1><?php langtrans('Month to Date'); ?></h1> 
		<?php genImageLink('monthtodate.gif','Month to Date',469,555); ?>
<?php } // end WD graph names    ?>

</div><!-- end main-copy -->

<?php
#--------------------------------------------------------------------------
# function genImageLink
#--------------------------------------------------------------------------

function genImageLink ( $imagename, $alttext, $width=310, $height=200) {
	global $graphImageDir;
	
	if(!file_exists($graphImageDir.$imagename)) {
		print "$graphImageDir$imagename not found.";
	} else {
		print "<img src=\"$graphImageDir$imagename\" alt=\"$alttext\" width=\"$width\" height=\"$height\" />\n";
	}

}
#--------------------------------------------------------------------------
# end genImageLink function
#--------------------------------------------------------------------------

############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
how can i fix this Beau
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by saratogaWX »

There's nothing the page that directly indicates a Error 500 would result, and regrettably, it's not possible for us to help debug it since your site is not being published to the internet where we could view and check settings/configurations.

An Error 500 can result from a page doing recursive includes of scripts, or exceeding the memory allotted for PHP, or exceeding the number of process threads allotted to PHP.

Have you unpacked (from the distribution .zip) a copy of the page and ASCII uploaded it (unmodified) to the document root?

Does the error still occur after that?

Have you set (in Settings-weather.php) the $SITE['graphImageDir'] = './images/'; and are the Cumulus image files
located in the ./images directory under your website document root directory?
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: Are you interested in a AJAX/PHP template set for Cumulu

Post by n9mfk »

Hi Ken I reloaded it
no luck are there any setting any setting i can look at in php.ini

Code: Select all

$SITE['WXtags'] 	= 'c:/n9mfk/CUTags.php';
$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
$SITE['realtimefile'] = 'realtime.txt';
$SITE['graphImageDir']  ='c:/n9mfk/images/';     // directory location for graph images with trailing 

also tried $SITE['graphImageDir']  ='./images/';
thanks Beau
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by saratogaWX »

Beau,
I'd not recommend you use absolute Windows paths in the settings (things like $SITE['WXtags'] = 'c:/n9mfk/CUTags.php';) as they aren't directly mappable to the XAMPP htdocs directory where all your webpages are served from. Your weather data file CUtags.php (not CUTags.php if you used the recommended name) should appear in your xampp htdocs directory, and the images in htdocs/images to make the template work as with other webservers.

I suggest you check the XAMPP apache/logs/error.log and see what PHP is griping about, and pursue your debugging from there.
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: Are you interested in a AJAX/PHP template set for Cumulu

Post by n9mfk »

Hi Ken,
I known for Linux server it ./
what is it for windows ?
thanks Beau
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by saratogaWX »

I'm sorry, Beau, but I don't understand your question. Would you mind restating it with additional information?
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: Are you interested in a AJAX/PHP template set for Cumulu

Post by n9mfk »

Hi Ken
by the info i looked at ./ does not work on windows
but im not sure yo use in it place
Beau
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Are you interested in a AJAX/PHP template set for Cumulu

Post by beteljuice »

I think beau might be refering to path delimiter / on real computers, \ on Windoze ;)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply