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 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Server generated SQL
Moderator: mcrossley
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Server generated SQL
I am trying to get this to work.
http://desford-weather.co.uk/images/graphHum.php
I have made sure cumulus.realtime exist and it does.
Not quite sure why this isnt working. Anyone have any ideas?
Thank you
P.S going to throw it out the window soon.
http://desford-weather.co.uk/images/graphHum.php
I have made sure cumulus.realtime exist and it does.
Not quite sure why this isnt working. Anyone have any ideas?
Thank you
P.S going to throw it out the window soon.
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
-
- Posts: 25
- Joined: Sat 14 Apr 2012 7:24 am
- Weather Station: Oregon WMR200
- Operating System: Raspberry pi 4
- Location: Sweden
Re: Server generated SQL
Is there any reason to place php file in folder " images " ?
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Server generated SQL
I assume that cumulus.realtime is the MySQL table that contains your realtime data?
What that is saying is that it cannot access it, despite you saying the table exists. Now if you are using the standard CumulusMX SQL have you set up that name (realtime) in the name box in the settings as the standard name if you used ImportCumulusFile.php is Realtime with a capital R.
Plus the actual code in graphHum.php
needs to reflect the naming of the table.
So I suspect that you have either a fault in your graph.settings file or the include file that sets the parameters to access your MySQL database.
On looking at the gauges on your site none of the images appear so that is consistent with incorrect settings.
Edit
Just checked a couple of other things. If it is working correctly you should be able to see the picture generated by using this URL http://desford-weather.co.uk/images/hum.png but in your case you appear to also have a jpgraph problem.
What that is saying is that it cannot access it, despite you saying the table exists. Now if you are using the standard CumulusMX SQL have you set up that name (realtime) in the name box in the settings as the standard name if you used ImportCumulusFile.php is Realtime with a capital R.
Plus the actual code in graphHum.php
Code: Select all
$query = "SELECT unix_timestamp(LogDateTime) AS time, $cols[attachment=0]jgraph problem.png[/attachment][attachment=0]jgraph problem.png[/attachment]
FROM Realtime
WHERE LogDateTime >= now() - INTERVAL " .$GRAPH['hours']. " HOUR
ORDER BY time";
So I suspect that you have either a fault in your graph.settings file or the include file that sets the parameters to access your MySQL database.
On looking at the gauges on your site none of the images appear so that is consistent with incorrect settings.
Edit
Just checked a couple of other things. If it is working correctly you should be able to see the picture generated by using this URL http://desford-weather.co.uk/images/hum.png but in your case you appear to also have a jpgraph problem.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
I don't know how to sort it out but would like to know what is causing it though.
graphsettings.php im /var/www/images see below.
$GRAPH = array();
############################################################################
# CONFIGURATION INFORMATION
############################################################################
$GRAPH['version'] = '1.7';
$GRAPH['width'] = 600;
$GRAPH['height'] = 300;
$GRAPH['jpgraphloc'] = '/var/www/jpgraph/'; // Path to jpgraph, or put it in your PHP path
// NOTE: This is the *server* operating system path to the file, so unless you have added
// the web folder to your PHP path, it will be something like "/home/<userid>/www/jpgraph/"
$GRAPH['cachetime'] = 10; // number of minutes to cache images
$GRAPH['hours'] = 24; // number of hours to graph
$GRAPH['uom'] = array('temp'=>'C', 'rain'=>'mm', 'wind'=>'mph', 'baro'=>'hPa', 'cloudbase'=>'feet');
$GRAPH['rosePoints'] = 16; // 8 or 16
$GRAPH['roseSize'] = 400;
// Localised Compass point array
$GRAPH['compass'] = array('N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW');
in /var/www/jpgraph/jpg-conf.inc.php see below
define('CACHE_DIR','/var/www/jpgraph/csimcache/');
define('TTF_DIR','/var/www/jpgraph/fonts/');
define('MBTTF_DIR','/var/www/jpgraph/fonts/');
//-------------------------------------------------------------------------
// Cache directory specification for use with CSIM graphs that are
// using the cache.
// The directory must be the filesysystem name as seen by PHP
// and the 'http' version must be the same directory but as
// seen by the HTTP server relative to the 'htdocs' ddirectory.
// If a relative path is specified it is taken to be relative from where
// the image script is executed.
// Note: The default setting is to create a subdirectory in the
// directory from where the image script is executed and store all files
// there. As ususal this directory must be writeable by the PHP process.
define('CSIMCACHE_DIR','csimcache/');
define('CSIMCACHE_HTTP_DIR','csimcache/');
all have chmod 775 permissions?
in jpgraph/fonts
I Have arial.ttf and verdana.ttf all chmod 775
Any ideas people??
graphsettings.php im /var/www/images see below.
$GRAPH = array();
############################################################################
# CONFIGURATION INFORMATION
############################################################################
$GRAPH['version'] = '1.7';
$GRAPH['width'] = 600;
$GRAPH['height'] = 300;
$GRAPH['jpgraphloc'] = '/var/www/jpgraph/'; // Path to jpgraph, or put it in your PHP path
// NOTE: This is the *server* operating system path to the file, so unless you have added
// the web folder to your PHP path, it will be something like "/home/<userid>/www/jpgraph/"
$GRAPH['cachetime'] = 10; // number of minutes to cache images
$GRAPH['hours'] = 24; // number of hours to graph
$GRAPH['uom'] = array('temp'=>'C', 'rain'=>'mm', 'wind'=>'mph', 'baro'=>'hPa', 'cloudbase'=>'feet');
$GRAPH['rosePoints'] = 16; // 8 or 16
$GRAPH['roseSize'] = 400;
// Localised Compass point array
$GRAPH['compass'] = array('N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW');
in /var/www/jpgraph/jpg-conf.inc.php see below
define('CACHE_DIR','/var/www/jpgraph/csimcache/');
define('TTF_DIR','/var/www/jpgraph/fonts/');
define('MBTTF_DIR','/var/www/jpgraph/fonts/');
//-------------------------------------------------------------------------
// Cache directory specification for use with CSIM graphs that are
// using the cache.
// The directory must be the filesysystem name as seen by PHP
// and the 'http' version must be the same directory but as
// seen by the HTTP server relative to the 'htdocs' ddirectory.
// If a relative path is specified it is taken to be relative from where
// the image script is executed.
// Note: The default setting is to create a subdirectory in the
// directory from where the image script is executed and store all files
// there. As ususal this directory must be writeable by the PHP process.
define('CSIMCACHE_DIR','csimcache/');
define('CSIMCACHE_HTTP_DIR','csimcache/');
all have chmod 775 permissions?
in jpgraph/fonts
I Have arial.ttf and verdana.ttf all chmod 775
Any ideas people??
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
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
I have no cumulus.realtime problem no more just jpgraph problem now.
Tried restoring jpgraph folder from a backup and still the same problem?
Tried restoring jpgraph folder from a backup and still the same problem?
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
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Server generated SQL
Do you have DejeVuSans.ttf installed in fonts ?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Server generated SQL
I very much doubt that JpGraph is installed at /var/www/.
It should be in your server area where your web site is installed so it is going to be more like
It should be in your server area where your web site is installed so it is going to be more like
Code: Select all
$GRAPH['jpgraphloc'] = '../jpgraph/'; // Path to jpgraph, or put it in your PHP path
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
Its in /var/www where jpgraph is located where jpgraph is located.
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
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Server generated SQL
But the jpgraphloc is a relative location not a complete location so if it is in a directory within your website the correct location is ../jpgraph.
The only other possibility is that the font doesn't exist within the fonts directory within the jpgraph directory.
The only other possibility is that the font doesn't exist within the fonts directory within the jpgraph directory.
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
root@debian:/var/www/jpgraph/fonts# ls
arial.ttf DejaVuSans-Bold.ttf DejaVuSans.ttf FF_FONT0.gdf FF_FONT1.gdf FF_FONT2.gdf lcdmono2ultra-webfont.svg LICENSE.TXT
DejaVuSans-BoldOblique.ttf DejaVuSans-Oblique.ttf FF_FONT0-Bold.gdf FF_FONT1-Bold.gdf FF_FONT2-Bold.gdf lcdmono2ultra-webfont.eot lcdmono2ultra-webfont.ttf Verdana.ttf
PHP Notice: date_default_timezone_set(): Timezone ID '+0:00' is invalid in /var/www/images/graphSettings.php on line 45, referer: http://desford-weather.co.uk/images/
if set to Europe/London I get a Error TZ Statement.
arial.ttf DejaVuSans-Bold.ttf DejaVuSans.ttf FF_FONT0.gdf FF_FONT1.gdf FF_FONT2.gdf lcdmono2ultra-webfont.svg LICENSE.TXT
DejaVuSans-BoldOblique.ttf DejaVuSans-Oblique.ttf FF_FONT0-Bold.gdf FF_FONT1-Bold.gdf FF_FONT2-Bold.gdf lcdmono2ultra-webfont.eot lcdmono2ultra-webfont.ttf Verdana.ttf
PHP Notice: date_default_timezone_set(): Timezone ID '+0:00' is invalid in /var/www/images/graphSettings.php on line 45, referer: http://desford-weather.co.uk/images/
if set to Europe/London I get a Error TZ Statement.
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
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
Done that no change.water01 wrote: ↑Sun 03 May 2020 10:58 am But the jpgraphloc is a relative location not a complete location so if it is in a directory within your website the correct location is ../jpgraph.
The only other possibility is that the font doesn't exist within the fonts directory within the jpgraph directory.
It's something to do with php open_basedir not allowing jpgraph to access the fonts.
in /etc/php/7.3/apache2/php.ini I have ;open_basedir =
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
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
Problem I have got now is as following:-
Error TZ Statement if I don't set timezone to +00:00 then I get the following error message.
PHP Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in /var/www/images/graphSettings.php on line 45, referer: http://desford-weather.co.uk/gauges-ss.htm
Also on jpgraph faq website I have created the following file and tested to see if php can find the fonts file or not.
https://jpgraph.net/doc/faq.php#F3-6
I have called this checkfonts.php as you can see http://desford-weather.co.uk/checkfonts.php php finds the font folder and says the following message.
PASS: Successfully read font file "/var/www/jpgraph/fonts/DejaVuSans.ttf". as I am having an error with jpgraph error 25092
So this is down to a problem with jpgraph which I have reported the problem with jpgraph or it's the SQL files im /images folder which Mark have created. (not blaming mark btw).
I am running wordpress due to business website and latest wordpress version requires php7.4. jpgraph 4.3.1 supports php7.4
So as a IT Technician I know a little about php but not much more hardware and software problem solving guy not really a coding type of person.
So any coding specialist people reading this can you give me any ideas how to sort this out please.
I am beginning to have greys hairs now. This is an interesting problem now.
It's only pictures but just makes the gauges complete and look nice.
Thanks for any suggestions.
Error TZ Statement if I don't set timezone to +00:00 then I get the following error message.
PHP Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in /var/www/images/graphSettings.php on line 45, referer: http://desford-weather.co.uk/gauges-ss.htm
Also on jpgraph faq website I have created the following file and tested to see if php can find the fonts file or not.
https://jpgraph.net/doc/faq.php#F3-6
I have called this checkfonts.php as you can see http://desford-weather.co.uk/checkfonts.php php finds the font folder and says the following message.
PASS: Successfully read font file "/var/www/jpgraph/fonts/DejaVuSans.ttf". as I am having an error with jpgraph error 25092
So this is down to a problem with jpgraph which I have reported the problem with jpgraph or it's the SQL files im /images folder which Mark have created. (not blaming mark btw).
I am running wordpress due to business website and latest wordpress version requires php7.4. jpgraph 4.3.1 supports php7.4
So as a IT Technician I know a little about php but not much more hardware and software problem solving guy not really a coding type of person.
So any coding specialist people reading this can you give me any ideas how to sort this out please.
I am beginning to have greys hairs now. This is an interesting problem now.
It's only pictures but just makes the gauges complete and look nice.
Thanks for any suggestions.
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
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Server generated SQL
As a matter of interest if you run phpinfo.php (I have attached it just in case) on your server does it show that gd is available as per the picture?http://desford-weather.co.uk/phpinfo.php
The reason I ask is the php extension gd is required to run jpgraphs.
Note I have attached phpinfo as phpinfo.txt (Forum does not allow uploads of php files) just rename it as phpinfo.php upload it and run I presume The reason I ask is the php extension gd is required to run jpgraphs.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: Server generated SQL
Thanks for replying mate.
http://desford-weather.co.uk/phpinfo.php click on it and you'll see Gd displaying the following:-
gd
GD Support
enabled
GD headers Version
2.2.5
GD library Version
2.3.0
FreeType Support
enabled
FreeType Linkage
with freetype
GIF Read Support
enabled
GIF Create Support
enabled
JPEG Support
enabled
PNG Support
enabled
WBMP Support
enabled
XPM Support
enabled
XBM Support
enabled
WebP Support
enabled
BMP Support
enabled
TGA Read Support
enabled
That's a tick to say it's enabled.
http://desford-weather.co.uk/phpinfo.php click on it and you'll see Gd displaying the following:-
gd
GD Support
enabled
GD headers Version
2.2.5
GD library Version
2.3.0
FreeType Support
enabled
FreeType Linkage
with freetype
GIF Read Support
enabled
GIF Create Support
enabled
JPEG Support
enabled
PNG Support
enabled
WBMP Support
enabled
XPM Support
enabled
XBM Support
enabled
WebP Support
enabled
BMP Support
enabled
TGA Read Support
enabled
That's a tick to say it's enabled.
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
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Server generated SQL
No problem.
Therefore it is still a path problem as you have tested the permissions, but I must admit it has me puzzled, need to think about it!!
Therefore it is still a path problem as you have tested the permissions, but I must admit it has me puzzled, need to think about it!!