How to setup jpgraphs and wxgraphs

I had an idea and have sent you a modified file to test one of the gauges to see if it works. Let me know either way work or not!

To be brutally honest I hope I’m wrong because if it works that means the way I’ve coded all graphs needs to be re-visited and yours will be the only hosting company where this problem exists and my graphs are used at least so far!

Stuart

Hi
i put that file on WX Graphs page and gives a different error
at present i have ftp problems so was lucky to get the file uploaded and the clientraw is not going to the correct folder some times

Harold

That’s something to do with your settings, that version is using default fonts so they cannot be other than 0 or 90 degrees. I’ll see what needs changing and let you know which line to edit and lets see if the graph then shows.

This is beginning to look like what I feared but we really need to confirm it to start with.

Change the following line numbers in the file, line 61 to


$graph->yaxis->title->SetAngle(0);

and line 79 to


$bplot->value->SetAngle(0);

Stuart

Well altered those lines and manged to get it uploaded and that gragh shows WX Graphs page so is this doing what you feared

Harold

Yes indeed. The problem is that your hosting company do not allow use of the eval php command which is what I removed from that test file (the other change had nothing to do with the original error). So all these graphs use the eval command to execute a line from the graphsconf file, this allowed me to simplify the code quite a lot. I have not had any other reports of this from anyone who uses my graphs. In order to fix this I need to alter all the individual graph files and the stuff in the graphsconf file which is quite a large task and to be honest I am reluctant to do this. I do know the eval commend ‘can’ be exploited but not the way I use it and this is probably why your hosting company disables it, but in my view that is overkill.

I’ll have a think out this…

Stuart

just going to post here so I can remember this thread.

I am not smart enough or have had time to get my graphs to work either

Your gauges are NOT the same images as being discussed in this thread. BTW your link to them works for me!

Stuart

His gauges work for me, too, but not the wxgraphs on them.

I only checked the link given and the were not my graphs, if he meant the jpgraph graphs why not link directly to them? I can find no obvious link to any jpgraph graphs.

Stuart

Stuart, there is a facility in SSGauges to show trend graphs in pop-ups that appear when you mouse-over the gauges - see mine - and most users of WD use the jp/wxgraphs because they get their data from the clientraw files. One has to edit the SS script gauges.js to choose exactly which graphs one wants to use, and sometimes adjust the aspect ratio in css too.

I think this is what @hcorrin and @chief-david want to use them for, too.

You can see all your graphs (V3.0) on my test page here. I have modified some of the scripts for the graphs I use in SSGauges and on a separate page here.

1 Like

Well the first thing to do with the jpgraphs is to get the test page I supply and get that working before trying anything else like adding to these gauges. There is no way to easily debug them unless you have the test page working first. It could be that he has the same issue as hcorrin but I don’t know. If he does then unless I spend ages rewriting all of them then they may never work!

Stuart

Absolutely :slight_smile:

Hi Stuart
that makes sense about the eval and thanks
no need to rush and rewrite on my count if i knew more about PHP i mite have had a go myself

as an aside looking at @chief-david page with Edge inspect option his gauges graghs are showing error 404 source not found

thanks Stuart

Harold

Can you not just ask your provider to enable the eval function?

I doubt that would be successful. My hosting provider allows me to enable it myself :slight_smile: Might be worth a go though.

Stuart

I have been having a discussion with my hosting provider about this and it seems that they thought they had disabled it but in fact this is not happening. If it had been disabled I would have discovered this early in the development and would have used a different set of coding in the first place - very annoying. I will try to find the time to change the code and release a new set of files but this may take some time.

It is also possible that either other hosting sites do not disable eval or their coding is suspect and the disable does not work as is the case with my hosting provider. You can easily see what your provider has set up by running the small script I told hcorrin about to run phpinfo (see here) and check the list of commands in the disable_function section of the output of that script, if it lists eval and my scripts still work then your provider has an issue with their setup. In which case I suggest reporting it because it may be other commands are not disabled many of which are very dangerous in the wrong hands.

Stuart

Hi Stuart
i tried asking about eval they suggested putting python on to enable eval, well tried that it failed, so based on what you said in your last post will have to discount eval.
as and when you get round to rewriting the scripts i am happy to test them for you if needed

Harold

A few weeks ago I decided to update the website because there were several things that did not work. I discovered the steel gauges and launched them on my website. Thanks to this thread I was able to get the graphics up and running.

Wow, visually much improved compared to how they are initially configured. I just implemented them but I would like to have them like you. I don’t understand programming. I think it is configured in gauges.js. Would you be so kind as to upload that configuration? On my website
[- Diales meteorológicos actuales]

Thank you

I am using an earlier version of wxgraphs (3.0). You can alter the shape in SS Gauges css, which makes them more easily readable.