Page 15 of 17

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:27 pm
by RayProudfoot
Jason,

Thanks but I can't open rar files. Can you upload as a standard Windows zip please?

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:28 pm
by 6719jason
RayProudfoot wrote:Jason,

Thanks but I can't open rar files. Can you upload as a standard Windows zip please?
Sure - all done and attached! :)

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:35 pm
by RayProudfoot
Thanks Jason. What does this look like? Good or bad?

http://www.cheadlehulmeweather.co.uk/re ... .php?debug

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:36 pm
by 6719jason
RayProudfoot wrote:Thanks Jason. What does this look like? Good or bad?

http://www.cheadlehulmeweather.co.uk/re ... .php?debug
Thats is bonza me ole mate!

Check out my similar output!

Current directory is: D:\Sites\weeleyweather.co.uk\public_html
Changing directory to: ./
Current directory is: D:\Sites\weeleyweather.co.uk\public_html
Attempting to load: realtime.txt
We loaded: 1 - Should be 1
Found 59 Fields
Saving Data as: 2011-05-28 00:35:50 11.4 73 6.7 1.3 0.0 270 0.0 0.0 1016.7 W 1 mph C hPa mm 0.6 -0.2 5.2 122.6 0.0 21.9 47 11.4 -0.2 11.4 00:32 10.9 00:00 2.1 00:25 6.4 00:21 1016.9 00:00 1016.4 00:21 1.9.1 989 6.2 11.4 11.4 0 0 0 277 0.0 0 0 0 W 1906 ft 10.2 0.0 0 0
COMPLETE

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:40 pm
by RayProudfoot
Excellent but I'm still confused. If I try to view the sample graphs via this link
http://www.cheadlehulmeweather.co.uk/gr ... -graph.php
I keep getting those error messages.

I'm attaching an error log from the graphs folder. This will hopefully tell us what it doesn't like.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Fri 27 May 2011 11:43 pm
by 6719jason
RayProudfoot wrote:Excellent but I'm still confused. If I try to view the sample graphs via this link
http://www.cheadlehulmeweather.co.uk/gr ... -graph.php
I keep getting those error messages.

I'm attaching an error log from the graphs folder. This will hopefully tell us what it doesn't like.
It seems its is having some sort of issue accessing the fonts.

Its also possible that there is an incorrect setting in GraphicSettings.php which should have come in the download package?

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 12:09 am
by RayProudfoot
Jason,

Here's my GraphSetting file. I've copied the fonts from the root directory to jpgraph\src\fonts and that seems to have stopped the errors but still no sample graphs.

I'm calling it a day now. Shattered! Thanks for your help. I'd like to get these working but if I can't I won't lose any sleep.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 12:14 am
by RayProudfoot
I'll also add the screenshot of CheckServer so you can check if it looks okay.
PHP.jpg

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 3:11 pm
by RayProudfoot
An update after a very frustrating evening yesterday.

Loading http://www.cheadlehulmeweather.co.uk/gr ... -graph.php

results in all graph images displaying the same error message - Empty input data array.

A error_log file is created in the graphs sub-folder when I run that script. Every entry now has the same error message with only the number of entries and php filename differing:-

[28-May-2011 15:53:42] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 132
[28-May-2011 15:53:42] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 133
[28-May-2011 15:53:42] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 134

So now I have a clear link between the inability of the script to create a graph and these error messages. I'm getting exactly the same message for every graph file. Given that I haven't edited any of the supplied graph php files I'm stumped why I get these errors.

Any help appreciated. I hate being defeated by software.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 4:39 pm
by steve
Ray, in the GraphSettings.php file that you uploaded, it has

$SITE['datafile'] = "realtime.log";

But http://www.cheadlehulmeweather.co.uk/gr ... altime.log gives a 404, so the file that it's looking for to get the data to populate the graphs doesn't exist. I think that's the reason for the "empty input array" error messages.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 5:21 pm
by RayProudfoot
Thanks for your help Steve. That file was in the root folder so I moved it to the graphs folder and tried to load just the temp graph:

http://www.cheadlehulmeweather.co.uk/graphs/temp.php

Again, I still got the usual "Empty Data input array" message and in the graphs folder this was in the error_log file.

[28-May-2011 18:12:50] PHP Warning: file(../realtime.log) [<a href='function.file'>function.file</a>]: failed to open stream: No such file or directory in /home/admin4/public_html/graphs/temp.php on line 85
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 85
[28-May-2011 18:12:50] PHP Warning: Invalid argument supplied for foreach() in /home/admin4/public_html/graphs/temp.php on line 100
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 132
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 133
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 134

It does appear realtime.log is the problem but having moved it and still with the same problem I'm struggling to know what to do next.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 5:30 pm
by steve
You have some garbage on the front of your realtime.log:

$SITE['home'] = "./";
$SITE['datafile'] = "realtime.log";
$SITE['source'] = "realtime.txt";2011-05-28 00:34:12 10.4 87 8.3 7.0 4.0 189 0.00 0.01 1013.79 S 2 mph C hPa in 4.0 -0.56 2.23 10.97 0.00 20.9 53 8.9 -0.4 11.1 00:00 10.4 00:31 9.0 00:03 18.0 00:25 1014.06 00:10 1013.79 00:33 1.9.1 989 18.0 10.4 10.9 0 0.000 0 205 0.01 0 0 0 SSW 847 ft 7.8 0.0 0 0

But I don't think that's actually the problem; I think the problem is that you don't have any data in your realtime.log file with suitable timestamps. I think the code looks for particular minutes and only plots those.

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 5:33 pm
by 6719jason
RayProudfoot wrote:Thanks for your help Steve. That file was in the root folder so I moved it to the graphs folder and tried to load just the temp graph:

http://www.cheadlehulmeweather.co.uk/graphs/temp.php

Again, I still got the usual "Empty Data input array" message and in the graphs folder this was in the error_log file.

[28-May-2011 18:12:50] PHP Warning: file(../realtime.log) [<a href='function.file'>function.file</a>]: failed to open stream: No such file or directory in /home/admin4/public_html/graphs/temp.php on line 85
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 85
[28-May-2011 18:12:50] PHP Warning: Invalid argument supplied for foreach() in /home/admin4/public_html/graphs/temp.php on line 100
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 132
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 133
[28-May-2011 18:12:50] PHP Warning: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array in /home/admin4/public_html/graphs/temp.php on line 134

It does appear realtime.log is the problem but having moved it and still with the same problem I'm struggling to know what to do next.
Hi Ray,

Sorry for not getting back to you sooner.

I've just had a look at my files and tried to source why these error messages are occurring....

It seems they come back to the settings entered in GraphSettings.php

I have attached a modded version of them for you to try...

Basically... within the GraphSettings is the following settings are set...

############################################################################
# CONFIGURATION INFORMATION
############################################################################
$SITE['version'] = "3.1";
$SITE['hloc'] = "./";
$SITE['jpgraphloc'] = "jpgraph/src/";
$SITE['datafile'] = "realtime.log";
$SITE['sitename'] = "Weeley Weather UK";
$SITE['bgncolor'] = "#EFEFEF";
$SITE['txtcolor'] = "#22464F";
$SITE['tz'] = "Europe/London";
#---------------------------------------------------------------------------
$SITE['infopass'] = "";
$SITE['debugpass'] = "";
$SITE['datapass'] = "sce";
$SITE['viewpass'] = "sce";
$SITE['debug'] = 0; # Adjustable via debug
$SITE['info'] = 1; # Adjustable via info

I'm not sure if yours is set correctly?

Jason

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 5:45 pm
by RayProudfoot
Hi Jason,

Thanks for sight of your GraphSettings.php. Mine is exactly the same except for the Station Name...

$SITE['version'] = "3.1";
$SITE['hloc'] = "../";
$SITE['jpgraphloc'] = "../jpgraph/src/";
$SITE['datafile'] = "realtime.log";
$SITE['sitename'] = "Cheadle Hulme Weather";
$SITE['bgncolor'] = "#EFEFEF";
$SITE['txtcolor'] = "#22464F";
$SITE['tz'] = "Europe/London";
#---------------------------------------------------------------------------
$SITE['infopass'] = "";
$SITE['debugpass'] = "";
$SITE['datapass'] = "sce";
$SITE['viewpass'] = "sce";
$SITE['debug'] = 0; # Adjustable via debug
$SITE['info'] = 1; # Adjustable via info

However, I was looking back through this thread and on Page 3 arthur posted a link to his realtime.log http://chh-p.dyndns.org/realtime.log

Now if you look at mine it's quite different and I suspect this is the reason JpGraph can't read it...

http://www.cheadlehulmeweather.co.uk/gr ... altime.log

Does that look like a kosha file to you?

Re: Cumulus Server Sided JpGraph Graphs

Posted: Sat 28 May 2011 6:05 pm
by 6719jason
RayProudfoot wrote:Hi Jason,

Thanks for sight of your GraphSettings.php. Mine is exactly the same except for the Station Name...

$SITE['version'] = "3.1";
$SITE['hloc'] = "../";
$SITE['jpgraphloc'] = "../jpgraph/src/";
$SITE['datafile'] = "realtime.log";
$SITE['sitename'] = "Cheadle Hulme Weather";
$SITE['bgncolor'] = "#EFEFEF";
$SITE['txtcolor'] = "#22464F";
$SITE['tz'] = "Europe/London";
#---------------------------------------------------------------------------
$SITE['infopass'] = "";
$SITE['debugpass'] = "";
$SITE['datapass'] = "sce";
$SITE['viewpass'] = "sce";
$SITE['debug'] = 0; # Adjustable via debug
$SITE['info'] = 1; # Adjustable via info

However, I was looking back through this thread and on Page 3 arthur posted a link to his realtime.log http://chh-p.dyndns.org/realtime.log

Now if you look at mine it's quite different and I suspect this is the reason JpGraph can't read it...

http://www.cheadlehulmeweather.co.uk/gr ... altime.log

Does that look like a kosha file to you?
I see what you mean - when you created the realtime.log file.... was it empty? Or did you insert the first 3 lines of code?

Mine starts like this....

2011-04-29 22:14:52 13.5 76 9.3 2.3 0.9 90 0.0 0.0 1009.5 E 1 mph C hPa mm 35.2 0.0 3.6 117.4 0.5 21.7 53 13.5

I created mine as an empty text file and uploaded it as realtime.log.....

It might be worth deleting everything from realtime.log in a text editor and then call 'realtimelog.php' and then checking your graphs...

Hope that makes sense?