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
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
graphWindRose.php
Moderator: mcrossley
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
graphWindRose.php
I am getting the following error message when im accessing this link:-
http://desford-weather.co.uk/images/graphWindRose.php
When graphWindRose.php is uncommented in graphSettings.php the error message happens on all graph images.
Any ideas please?
Thanks.
http://desford-weather.co.uk/images/graphWindRose.php
When graphWindRose.php is uncommented in graphSettings.php the error message happens on all graph images.
Any ideas please?
Thanks.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
the code is as follows in graphSettings.php
$query = "SELECT unix_timestamp(LogDateTime) AS time, $cols
FROM Realtime
WHERE LogDateTime >= now() - INTERVAL " .$GRAPH['hours']. " HOUR
ORDER BY time";
#include $GRAPH['jpgraphloc'] . 'jpgraph_windrose.php'; when I uncomment this out my graph images don't work and display the following message.
ERROR - Bad Select Statement: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDE' at line 2
SELECT unix_timestamp(LogDateTime) AS time, FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY time
when I remove the after "AS Time, as advised this message occurs below
HTTP 500 error
That’s odd… the website can’t display this page
$query = "SELECT unix_timestamp(LogDateTime) AS time, $cols
FROM Realtime
WHERE LogDateTime >= now() - INTERVAL " .$GRAPH['hours']. " HOUR
ORDER BY time";
#include $GRAPH['jpgraphloc'] . 'jpgraph_windrose.php'; when I uncomment this out my graph images don't work and display the following message.
ERROR - Bad Select Statement: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDE' at line 2
SELECT unix_timestamp(LogDateTime) AS time, FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY time
when I remove the after "AS Time, as advised this message occurs below
HTTP 500 error
That’s odd… the website can’t display this page
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: graphWindRose.php
Your SQL select is wrong, it is missing the column name..
Should be...
The columns are defined in graphWindRose.php at line 22...
Code: Select all
SELECT unix_timestamp(LogDateTime) AS time, FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY timeCode: Select all
SELECT unix_timestamp(LogDateTime) AS time, bearing, wspeed FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY timeCode: Select all
$w1 = get_data(array('bearing', 'wspeed'));-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
Thanks Mark,
Do I need ; at the end of the line $query = SELECT unix_timestamp(LogDateTime) AS time, bearing, wspeed FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY time
PHP Parse error: syntax error, unexpected 'unix_timestamp' (T_STRING) in /var/www/images/graphSettings.php on line 140
PHP Parse error: syntax error, unexpected ']', expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /var/www/images/graphSettings.php on line 151
line 151 is code:- $keys[] = $flds[$i]->name;
in file WindRose.php is this code ok now?
//fetch the data
$w1 = get_data(array('bearing', 'wspeed'));
$w2 = get_data('wind');
$datay = $w1['bearing'];
//$datay1 =$w2['wspeed'];
$datay1 =$w2['wgust'];
Any ideas cheers.
Do I need ; at the end of the line $query = SELECT unix_timestamp(LogDateTime) AS time, bearing, wspeed FROM Realtime WHERE LogDateTime >= now() - INTERVAL 24 HOUR ORDER BY time
PHP Parse error: syntax error, unexpected 'unix_timestamp' (T_STRING) in /var/www/images/graphSettings.php on line 140
PHP Parse error: syntax error, unexpected ']', expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /var/www/images/graphSettings.php on line 151
line 151 is code:- $keys[] = $flds[$i]->name;
in file WindRose.php is this code ok now?
//fetch the data
$w1 = get_data(array('bearing', 'wspeed'));
$w2 = get_data('wind');
$datay = $w1['bearing'];
//$datay1 =$w2['wspeed'];
$datay1 =$w2['wgust'];
Any ideas cheers.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
I am so close, http://desford-weather.co.uk/gauges-ss.htm
following errors in apache2/error.log
PHP Warning: Division by zero in /var/www/jpgraph/jpgraph_windrose.php on line 140
PHP Fatal error: Uncaught Error: Class 'WindroseGraph' not found in /var/www/jpgraph/jpgraph_windrose.php:149\nStack trace:\n#0 /var/www/images/graphSettings.php(42): include()\n#1 /var/www/images/graphSolar.php(14): require_once('/var/www/images...')\n#2 {main}\n thrown in /var/www/jpgraph/jpgraph_windrose.php on line 149
Invalid argument supplied for foreach() in /var/www/images/graphSettings.php on line 131, referer: http://desford-weather.co.uk/images/
following errors in apache2/error.log
PHP Warning: Division by zero in /var/www/jpgraph/jpgraph_windrose.php on line 140
PHP Fatal error: Uncaught Error: Class 'WindroseGraph' not found in /var/www/jpgraph/jpgraph_windrose.php:149\nStack trace:\n#0 /var/www/images/graphSettings.php(42): include()\n#1 /var/www/images/graphSolar.php(14): require_once('/var/www/images...')\n#2 {main}\n thrown in /var/www/jpgraph/jpgraph_windrose.php on line 149
Invalid argument supplied for foreach() in /var/www/images/graphSettings.php on line 131, referer: http://desford-weather.co.uk/images/
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
I have included the files and the apache2 error file which could fix this problem?
I had to rename the jpgraph_windrose.php to txt because the extension isn't allowed on this forum.
please upload a fix if anyone knows how to fix the Windrose I would really would like to fix this problem.
I have no idea why the 2 temperature gauges have a ? before C
http://desford-weather.co.uk/gauges-ss.htm
I had to rename the jpgraph_windrose.php to txt because the extension isn't allowed on this forum.
please upload a fix if anyone knows how to fix the Windrose I would really would like to fix this problem.
I have no idea why the 2 temperature gauges have a ? before C
http://desford-weather.co.uk/gauges-ss.htm
You do not have the required permissions to view the files attached to this post.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
- 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: graphWindRose.php
At some point gauges.js has been edited and saved but NOT in UTF-8 format.I have no idea why the 2 temperature gauges have a ? before C
Best to get a fresh copy to edit ....
EDIT: Your posted jpgraph_windrose.php is nothing like what it should be
......................Imagine, what you will KNOW tomorrow !
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
I copied it from Marks github site then pasted it.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
sfws
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: graphWindRose.php
Yes but into what did you paste?
I am guessing it was not a file set up with UTF-8 encoding.
Use notepad++ or similar editor that lets you choose encoding before you paste in.
I am guessing it was not a file set up with UTF-8 encoding.
Use notepad++ or similar editor that lets you choose encoding before you paste in.
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
I used winscp on windows
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
- 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: graphWindRose.php
One thing at a time ...
Here's the correct jpgraph_windrose.php file.
Note it is 'zipped', any file that is not a native .txt file or graphic you should zip before posting as an attachment
(Usually 'browse' your file folder, select, and <right-click> - send to ... zip)
I haven't got an 'unspoilt' gauges.js to donate - sorry
For editing files the weapon of choice is Notepad++
It will usually auto detect the script language, and the encoding (ANSI / UTF-8 etc.)
'Ordinary' notepad, or cut'n'paste from view-source can create all sorts of problems for the unwary - so always look for a zip download or 'raw' file (noting charset with the later)
If you still have problems will the degree symbol (after ensuring gauges.js is OK), then check the method it is being UPloaded to your web space.
Here's the correct jpgraph_windrose.php file.
Note it is 'zipped', any file that is not a native .txt file or graphic you should zip before posting as an attachment
(Usually 'browse' your file folder, select, and <right-click> - send to ... zip)
I haven't got an 'unspoilt' gauges.js to donate - sorry
For editing files the weapon of choice is Notepad++
It will usually auto detect the script language, and the encoding (ANSI / UTF-8 etc.)
'Ordinary' notepad, or cut'n'paste from view-source can create all sorts of problems for the unwary - so always look for a zip download or 'raw' file (noting charset with the later)
If you still have problems will the degree symbol (after ensuring gauges.js is OK), then check the method it is being UPloaded to your web space.
You do not have the required permissions to view the files attached to this post.
......................Imagine, what you will KNOW tomorrow !
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
Thank you
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
richard_newberry
- Posts: 500
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: graphWindRose.php
Hi beteljuice,
Thank you very much for sorting the jpgraph_windrose.php file out for me.
I have done the gauges.js and saved it under notepad++ as advised and it works thank you.
However now I have this problem.
I have Verdana.ttf under /var/www/jpgraph/fonts/ on permission 0644 like the other files in the folder.
Any idea, nearly there.
Thank you very much for sorting the jpgraph_windrose.php file out for me.
I have done the gauges.js and saved it under notepad++ as advised and it works thank you.
However now I have this problem.
I have Verdana.ttf under /var/www/jpgraph/fonts/ on permission 0644 like the other files in the folder.
Any idea, nearly there.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk