How to setup jpgraphs and wxgraphs

OK, that’s because it’s expecting the graphs to be in /gaugesnew but they are in /wxgraphs so you need to fix the path. This time you need to look at the readme.txt for the gauges, I see:

If required edit the “gauges.js”, the key items are at the top:
The relative path on your website to the “realtimegauges.txt” file.
The relative path on your website to your ‘trend’ graphs folder.

:smiley: You have got my graphs working !!!

The only thing I am shy are the links at the bottom of the page.

eg. http://www.llsc.org.uk/gaugesnew/yesterday.htm returns an error. I have looked and cant find where yesterday.htm exists let alone where to make the directory change

This help is gratefully received.

The links at the bottom of the page you have used are for Cumulus. Just remove them and use your normal webpage links that you use on the rest of the site. Lots of people use the Saratoga templates that separate out the navigation links. Sorry but I haven’t checked your site to see which templates you ate using - too much Christmas good and drink beckoning…

I decided to update my wxgraphs page today and so far not to good : ) http://www.mcgeescrossroadsweather.com/wxgraphs.php I’m receiving the following error “Parse error: syntax error, unexpected ‘/’ in /virtual/users/e16559-17849/web/jpgraph-3.5.0b1/src/jpg-config.inc.php on line 39” I did edit the graphsconf.php file and the jpg-config.inc.php file. My hard path is “/virtual/users/e16559-17849/web/jpgraph-3.5.0b1/ttf/”. Could someone please give me a suggestion on what I need to do to correct my issue.

$hostloc = “${WEBROOT}/”; //must have trailing slash
$jploc = “${WEBROOT}/jpgraph-3.5.0b1/src/”; //must have trailing slash

// define(‘CACHE_DIR’,‘/tmp/jpgraph_cache/’);
/virtual/users/e16559-17849/web/jpgraph-3.5.0b1/ttf/‘);
// define(‘MBTTF_DIR’,’/usr/share/fonts/TrueType/');

Thank you in advance…

Ronnie

I went back and checked my work again…currently I’m receiving this error: Parse error: syntax error, unexpected ‘$SERVER_SYSTEMROOT’ (T_VARIABLE) in /virtual/users/e16559-17849/web/jpgraph-3.5.0b1/src/jpg-config.inc.php on line 34

//------------------------------------------------------------------------
// define(‘CACHE_DIR’,‘/tmp/jpgraph_cache/’);
define(‘TTF_DIR’,‘/virtual/users/e16559-17849/web/jpgraph-3.5.0b1/ttf/’);
// define(‘MBTTF_DIR’,‘/usr/share/fonts/TrueType/’);

//-------------------------------------------------------------------------

$hostloc = “${WEBROOT}/”; //must have trailing slash
$jploc = “${WEBROOT}/jpgraph-3.5.0b1/src/”; //must have trailing slash

http://www.mcgeescrossroadsweather.com/wxgraphs.php

Ronnie

Hi everybody

I’m trying to set up jpgraphs and wxgraphs

I’m getting a problem with fonts

http://www.weather-above.com/wxgraphs/wxgraphs_test.html

Trying to get the graphs set up for steelGauges

http://www.weather-above.com/steelGauge.html

Appreciate any help is my dyslexia is starting to get the better of me

Thank you

The font the scripts are looking for is arialbd.ttf as you can see in the error messages.

That font is not in your fonts folder, but there is a ARIALBD.ttf
You should copy that font and name it arialbd.ttf
You can not simply rename it as 1 of the graphs work OK.

===
If that does not work, you have check the path in jpgraph/src/jpg-config.php
Try

define('TTF_DIR', "../fonts/ttf/");

Succes, Wim

I setup wxgraphs on my web site some 8+(?) years ago 8O or so and all has been working fine until this week. My guess is a php update or such on my web host has resulted in issues. My graphs no longer work and I get an error about the strfttime() being used.

I thought it may be best to update everything but not exactly sure where to start. I’m guessing download and install latest jpgraph but have there been updates to the wxgraphs php scripts themselves? Is there a better alternative I can look into? With a long weekend and current wind chills between -10 and -20

Bill, how familiar (knowledgeable) are you with PHP?

Oh, also be advised that PHP 7 has officially been released … and that PHP 5.6 will only be supported until December 2016.

The ‘JpGraph’ scripts are 5+ years old - they have not been updated since October 2010.

You might be interested in looking at the more modern and regularly updated ‘Highcharts’ - there will be a ‘learning curve’ but it will be well worth your time - once you understand how to produce one of the charts you will want to convert all your website charts to the Highcharts… :wink:

Thanks Ray. I’m just a little familiar with php, enough to be dangerous I guess. :? I’ll look into those Highcharts, I’ve seen them on various other web sites and they do look nice.

PS…got the same php time error when I tried to view your station graphs.

Bill

What version jpgraph are you running?

The stone age one…1.21. Wondering if just updating the version of jpgraphs will solve my problem?

I have a test page working OK on jp 3.5 so give it a try, as I recall I had to make a small change to 3.5 to get the “old” format.

Bill, unfortunately, the pages you saw (when you clicked on my link) are way outdated … like really really outdated… :oops:

I have been working on some new and much more modern templates but I have not put them online yet … I keep pushing the date/year for the release of the new pages… :roll:

keep pushing the date/year for the release of the new pages... :roll:

Understand completely. I have a list of things I need to update but other things get in the way. :?

Bill, as you noticed on my site, the JpGraph do not seem to work well (or at all) with PHP 7… :oops:

Well, all of a sudden my graphs are working again with no changes on my part. Go figure. :scratch: Perhaps a setting on the server at my web host was changed?

What is wrong with me? What is it that I am doing wrong?
I can not see what is wrong

I have tried to follwo Tim Hankos guide.

I got the test.php and it replies that I have PHP 5.6.17 and GD support enabled

I got the jpgraph-3.5.0b1.tar
(I can not find the version 2.2 that Tim is pointing to)
Location for jpgraph is: /usr/local/www/apache24/data/jpgraph-3.5.0b1/

Broadstaris wxgraphs is in place: /usr/local/www/apache24/data/wxgraphs/

Did I get the graphsconf.php correct ?

//where are your clientraw*-files and JPGraph relative to where this file is^M
//note you should only need to change the jpgraph directory if you do not use standard names^M
//$hostloc = “${WEBROOT}/”; //must have trailing slash^M
$hostloc = “/usr/local/www/apache24/data/weather/weatherdata/”;^M
$jploc = “/usr/local/www/apache24/data/jpgraph-3.5.0b1/”; //must have trailing slash^M
^M
//Set this variable to either 12 or 24 depending on whether you run Weather Display in 12 or 24 hour mode^M
$hourmode = “24”;^M

When I run the hardpath.php I get: /usr/local/www/apache24/data/jpgraph-3.5.0b1/ttf/ in my browser

Then I have edit the jpg-config.inc.php and added the path
/usr/local/www/apache24/data/jpgraph-3.5.0b1/ttf/

Uploaded the fonts to the ttf folder

The server says that it is unable to locate the JPGraph files when I try to get the rain_1hr.php

I run WDL 10.37R Build 81 on Win Xp and the files a uploaded to Freebsd 10.1

Please, command me dark lords…
:smiley:


graphsconf.php.txt (8.83 KB)

jpg-config.inc.php.txt (5.96 KB)

rain_1hr_php.JPG

What is the full url are you using for rain_1hr.php?

I use the LAN…
http://192.168.100.100/wxgraphs/rain_1hr.php

And I have tried the FQDN too
http://www.schultze.nu/wxgraphs/rain_1hr.php