Wxgraphics Error Message

I am getting this JpGraph error message when bringing up my wxgraphs test page:

A similar error graphic shows for each of the graphs on the page.

https://www.sartelleastweather.com/wxgraphs/wxgraphs_test.html

I’ve tried to reduce the margins in graphsconf.php, but the error message remained. Hoping to learn what I might need to do to fix this problem. Thanks.

The error is almost certainly in the PHP code which can’t be viewed on your website. All the charts seem to have the same error, so if you’re able to post the code for one of them then we might be able to spot a common error.

That 50 x -11347 is weird. Make sure all your clientraw files have valid data in them, there is a parser on Saratoga-weather.org. It could also be an error in the config file.

Stuart

I think the problem was related to the font configurations I had made. I reloaded graphsconf.php and made the minimum settings needed. Now the previous error is removed but the graphs do not show. My pathway settings are:

$hostloc = "${WEBROOT}/";                   //if your files are in a sub-directory you must add trailing slash
//note you should only need to change the jpgraph directory if you do not use standard names
$jploc = "${WEBROOT}/jpgraph-4.4.2/src/";   //must have trailing slash

What version of PHP? If 8.2, I think you have to change ${WEBROOT} to {$WEBROOT}

Thanks but I have the 8.1 version.

With that code you have an old zip file. Download the latest zip file as it has the ${WEBROOT} changed to {$WEBROOT} already in there. There may be other fixes you’re missing as well. https://www.stella-maris.org.uk/code/wxgraphs.zip I am running PHP v8.2.17 and it works.

Stuart

Thank you, Stuart. The version that I just downloaded using the link you provided is V4.1 dated 14 October 2022. It still shows $(WEBROOT) rather than ($WEBROOT). Is there a later version?

I finally got the graphs showing after getting the Arial font installed and correcting an error I had made in the ttf pathway. The V4.1 wxgraphs version seems to be working OK, although for some reason the temperature charts are not showing. But I will work on that and hopefully will soon be able to add a page of these graphs to my website.Thank you, Stuart, for these great graphs and for your and everyone’s help. --Bill

Apologies… try again. I obviously uploaded the wrong zip, date correct file wrong one!

Stuart

Thanks, Stuart, for your help. As I mentioned, the graphs page is up and running. I am now having fun working with it and want to thank you again for creating the graphs. They will be nice additions to my website.