Page 1 of 4
Cumulus and jpgraphs
Posted: Fri 04 Mar 2011 6:34 pm
by dvandellen
Hello,
I'm trying to set up jpgraphs.
But when i go to
http://www.weerstationniawier.nl/baro.php it gives an error code.
What needs to be changed?
Re: Cumulus and jpgraphs
Posted: Fri 04 Mar 2011 6:54 pm
by nitrx
It seems you're running a local server on your computer and jpgraph isn't installed/availble ?
Warning: include(../jpgraph/src/jpgraph.php): failed to open stream: No such file or directory in D:\www\weerstationniawier.n\www\GraphSettings.php on line 16
Re: Cumulus and jpgraphs
Posted: Fri 04 Mar 2011 7:22 pm
by dvandellen
Ik heb al de bestanden geupload naar mijn website zoals staat omgschreven...
(i uploaded all the files to my website...)
Re: Cumulus and jpgraphs
Posted: Fri 04 Mar 2011 7:30 pm
by nitrx
Is the ./realtime.log also availble ? Seems it's missing but I don;t use the script of tnetweather maybe some-one else has a clue..
Re: Cumulus and jpgraphs
Posted: Fri 04 Mar 2011 9:40 pm
by daj
You clearly have some paths hard coded into the php code somewhere, which refer to your local D: drive on your computer. These will need to be changed to relative paths for your webserver.
We can not see the source of the php file so can not help. You will need to upload as a zip for more help
Re: Cumulus and jpgraphs
Posted: Sat 05 Mar 2011 12:43 am
by gemini06720
A few questions Mr. D:
- First and foremost, does your host server make PHP available - can you use PHP scripts on your host server (
use this script to test for PHP)?
- Have you installed and is your computer running the 'realtimelog.php' script to produce the 'realtime.log' file (
where the script can be downloaded)?
- Have you installed the
JpGraph library - either version 3.5.0b1 (2010-10-07) or version 3.0.7 (2010-01-11)?
- Into which directory have you installed the JpGraph library - path from the root.
- Into which directory are the Cumulus files installed (where both the 'realtime.txt' file and the 'realtimelog.php' script are located) - path from the root.
- Into which directory is the file 'realtime.log' produced (located) (if different than the previous location) - path from the root.
- Have you made modification to line 63-70 of the 'GraphSettings.php' template?
- Into which directory have you installed the following scripts - again, path from the root:
- 'baro.php', 'dewpt.php', 'GraphSettings.php', 'intemp.php', 'rain.php', 'temp.php', 'wind.php', 'winddir.php', and even 'samp-graph.php' (which will be useful for testing purposes and can be removed later on)
Once you have provided the basic information, it will be easier for anyone to help you getting those graphs going. Here is a view of what you can do with the basic graphic templates: [link removed] (it might be a bit slow to get the graphics to display).
Re: Cumulus and jpgraphs
Posted: Tue 08 Mar 2011 8:05 pm
by dvandellen
Hi sorry for the late answer...
Question 1 - When i check my checkserver.php it says:
Yes, it does. Your server has PHP Version 5.3.4
Question 2 - yes i have made a new realtimelog.php and cumulus process and upload it to
http://www.weerstationniawier.nl/nieuwe ... altime.log
Question 3 - yes i have installed version 3.5.0b1
Question 4 - when i open my website with filezilla, i go to folder> www > nieuwegrafieken > (here are my baro.php/graphsettings.php/realtime.txt/realtime.log etc)
In this folder "nieuwegrafieken" i also have the "jpgraph" folder. In the "jpgraph" folder is the folder "src"
Question 5 - realtime.txt and realtimelog.php are located at C:/program files/cumulus/
Question 6 - cumululs takes realtimelog.php and processes&upload it to realtime.log in /www/nieuwegrafieken/
Question 7 - Yes:
$SITE['version'] = "3.1";
$SITE['hloc'] = "/www/nieuwegrafieken";
$SITE['jpgraphloc'] = "/nieuwegrafieken/jpgraph/src/";
$SITE['datafile'] = "/nieuwegrafieken/realtime.log";
$SITE['sitename'] = "/www/";
$SITE['bgncolor'] = "#EFEFEF";
$SITE['txtcolor'] = "#22464F";
$SITE['tz'] = "US/Arizona"; (i know i have to change this)
Question 8 - as question 4: /www/nieuwegrafieken/
I hope someone can figure out whats wrong.
Thanks in advance...
Re: Cumulus and jpgraphs
Posted: Tue 08 Mar 2011 11:17 pm
by beteljuice
I don't use these scripts myself, but looking at the paths in the error output I suspect there is TOO much information in the location defs.
$SITE['hloc'] = "/www/nieuwegrafieken";
$SITE['jpgraphloc'] = "/nieuwegrafieken/jpgraph/src/";
$SITE['datafile'] = "/nieuwegrafieken/realtime.log";
I think .....
$SITE['hloc'] = "/www/nieuwegrafieken";
$SITE['jpgraphloc'] = "/jpgraph/src/";
$SITE['datafile'] = "/realtime.log";
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 10:18 am
by dvandellen
I changed the graphsettings.php to what "beteljuice" said...
It looks like some errors are gone but its still not working.
see this link for the errors>
http://www.weerstationniawier.nl/nieuwe ... n/baro.php
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 12:21 pm
by beteljuice
I'm REALLY not the one to be advising you on this ....
The only(?) problem now seems to be it cant find realtime.log
In realtime log the paths are defined as:
############################################################################
$SITE['version'] = "3.0";
$SITE['home'] = "/www/";
$SITE['datafile'] = "realtime.log";
$SITE['source'] = "realtime.txt";
#---------------------------------------------------------------------------
which seem to be incomplete, but I can't find your realtimelog.php - so you need to run it with .../realtimelog.php?debug=y
And that should tell you where it's trying to do things. In reltimelog it also makes the point that the file MUST exist and write permissions enabled (but I think you are probably OK with that)
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 12:37 pm
by gemini06720
Sorry for the delay in replying ... I have spent the past days updating and modifying some weather templates...
First, the link you posted to the 'realtime.log' file is not showing the right file - the link point to the 'realtimelog.php' file which must be run (through a server CRON job) at regular intervals to produce the 'realtime.log' file - Cumulus cannot produce the 'realtime.log' file by processing the 'realtimelog.php' script - the 'realtimelog.php' script has to be run by itself (usually through the use of a server CRON job) to produce the 'realtime.log' file - at regular intervals (any time between 1 and 5 minutes) the 'realtimelog.php' script will read the data from 'realtime.txt' and will write that data to the 'realtime.log' file - then the 'realtime.log' file is used by the different PHP scripts to produce the weather graphics. The 'realtime.log' file should look something like this (lines and lines of weather data):
Code: Select all
2011-03-09 00:02:01 3.9 90 2.4 0.0 0.0 127 0.0 0.0 1017.88 SE 0 km/h C hPa mm 0.0 -0.51 53.6 589.8 10.4 22.2 32 3.9 -0.3 3.9 00:00 3.9 00:00 0.0 00:00 0.0 00:00 1017.88 00:00 1017.85 00:01 1.9.1 982 0.0 3.9 3.9 0.0 -0.08 0 0 0.0 8 0 0 --- 185 m 2.3 0.0 0 0
2011-03-09 00:03:01 3.9 90 2.4 0.0 0.0 127 0.0 0.0 1017.85 SE 0 km/h C hPa mm 0.0 -0.54 53.6 589.8 10.4 22.2 32 3.9 -0.3 3.9 00:00 3.9 00:00 0.0 00:00 0.0 00:00 1017.88 00:00 1017.85 00:01 1.9.1 982 0.0 3.9 3.9 0.0 -0.08 0 0 0.0 8 0 0 --- 185 m 2.3 0.0 0 0
2011-03-09 00:04:01 3.9 90 2.4 0.0 0.0 127 0.0 0.0 1017.82 SE 0 km/h C hPa mm 0.0 -0.54 53.6 589.8 10.4 22.2 32 3.9 -0.3 3.9 00:00 3.9 00:00 0.0 00:00 0.0 00:00 1017.88 00:00 1017.82 00:03 1.9.1 982 0.0 3.9 3.9 0.0 -0.08 0 0 0.0 8 0 0 --- 185 m 2.3 0.0 0 0
2011-03-09 00:05:01 3.9 90 2.4 0.0 0.0 127 0.0 0.0 1017.78 SE 0 km/h C hPa mm 0.0 -0.55 53.6 589.8 10.4 22.2 32 3.9 -0.3 3.9 00:00 3.9 00:00 0.0 00:00 0.0 00:00 1017.88 00:00 1017.75 00:04 1.9.1 982 0.0 3.9 3.9 0.0 -0.08 0 0 0.0 8 0 0 --- 185 m 2.3 0.0 0 0
2011-03-09 00:06:01 3.9 90 2.4 0.0 0.0 127 0.0 0.0 1017.82 SE 0 km/h C hPa mm 0.0 -0.54 53.6 589.8 10.4 22.2 32 3.9 -0.3 3.9 00:00 3.9 00:00 0.0 00:00 0.0 00:00 1017.88 00:00 1017.75 00:04 1.9.1 982 0.0 3.9 3.9 0.0 -0.08 0 0 0.0 8 0 0 --- 185 m 2.3 0.0 0 0
Looking at the results produced by the 'baro.php' script, they indicate that the 'realtime.log' file is not available or not in the right location.
You need to setup the 'realtimelog.php' script to produce a 'realtime.log' file at regular intervals (between 1 and 5 minutes)?
Am I to understand that the files 'realtime.txt', 'realtimelog.php', 'realtime.log', 'GraphSettings.php', 'baro.php', etc. and the directory 'jpgraph' are all located into the same directory?
If the files mentioned above are all in the same directory, these are the minimum requirements for the 'GraphSettings.php' script:
Code: Select all
$SITE['hloc'] = "./";
$SITE['jpgraphloc'] = "./jpgraph/src/";
$SITE['datafile'] = "realtime.log";
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 12:45 pm
by gemini06720
beteljuice wrote:I'm REALLY not the one to be advising you on this ....
Ah, sure, you can...
beteljuice wrote:The only(?) problem now seems to be it cant find realtime.log
I do not think the 'realtime.log' file is being created/produced - the 'realtime.log' file cannot be produced by running the 'realtimelog.php' script through Cumulus - the 'realtimelog.php' script has to be run by itself (server CRON job) so it read the Cumulus-produced 'realtime.txt' file and cumulatively save that data into the 'realtime.log' file.
As indicated into my previous reply, the use of relative paths has proven to be the easiest way for me to get the scripts to display the weather graphics.
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 1:04 pm
by dvandellen
it was not uploading realtimelog.php correctly
What needs to be the home directory in the realtimelog.php? what files need it?
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 1:18 pm
by gemini06720
dvandellen wrote: What needs to be the home directory in the realtimelog.php? what files need it?
Here are the settings I have in my 'realtimelog.php' script:
Code: Select all
$SITE['home'] = "./";
$SITE['source'] = "realtime.txt";
$SITE['datafile'] = "realtime.log";
The Cumulus-produced 'realtime.txt' file and the 'realtimelog.php' script are in the same directory - the resulting 'realtime.log' file is also in the same directory.
Re: Cumulus and jpgraphs
Posted: Wed 09 Mar 2011 1:22 pm
by dvandellen
hmm i didnt notice your last 2 replys...
im try to set it right...