Page 2 of 2

Re: Steelseries Upgrade.

Posted: Wed Feb 01, 2017 9:34 am
by Phil23
Toxic17 wrote:yeah I am at a lost too, though I have the graphs now being displayed on their own, just not in the popup windows.

https://www.conligwx.org/graphPress.php

the .htaccess file supplied is suppose to change the naming convention so you dont have to rename the line 203 etc. though I still cannot get the images shown using *.png files


If you are seeing the images when you run the Php, sounds like you are mostly there.
I was stuck at that point until I came to understand that the .htaccess file belonged in with the images & the scripts.

Mine are in weather/images on a standard CumulusMX install.

the other issue I have is I am on PHP 7.1.1 and I needed jpgrahs 4.x and higher. the scripts Mark has kindly provided was calling for a php file that was not part of jpgraphs 4.0.x


That may not be an issue if the php's are already displaying the images as in..

http://weather.inverellit.com/images/graphPress.php

the missing file was: jpgraph_glayout_vh.inc.php which I had to check the Apache logs too see what the hell was going on..


I just deleted that line as mentioned on Github, https://github.com/mcrossley/Cumulus-MX-Gauge-Graphs

Code: Select all

Mark Wittl has kindly contributed a WindRose script, if you want to use this graphic, then there are some additional steps you need to take...
1.Modify the  jpgraph_windrose.php  file to remove the import of 'jpgraph_glayout_vh.inc.php'  //require_once('jpgraph_glayout_vh.inc.php');
2.Edit the  jp-config.inc.php  file to point to the font directory under the installed jpgraph location  define('TTF_DIR','<YOUR_PATH>/jpgraph/fonts/');  You will need the following font files  arial.ttf  and  verdana.ttf


I have managed to put that with the rest of the jpgraph files and now it at least displays the graph calling the php file on its own. I think the next is is the popups are not creating the image files due to the naming so I will try your workaround and see if i get any joy.


Got stuck there as well, as no new png's are created, they are made on the fly, by the .htaccess.
Think that's roughly like Subst in the DOS days, (very poor comparison).

So even now when it's working, there are no new PNG's created in my ../images/ directory, only the PHP scripts & the .htaccess file.

Hope that helps

Phil.

Re: Steelseries Upgrade.

Posted: Wed Feb 01, 2017 5:44 pm
by mcrossley
Phil23 wrote:Got stuck there as well, as no new png's are created, they are made on the fly, by the .htaccess.


The PHP scripts return the image data to the browser, it isn't stored anywhere. The .htaccess file just translates "image" file names into script names, so they look like regular images to your browser - and can use the same filenames for the images so existing pages/scripts for Cumulus 1 continue to work.

Re: Steelseries Upgrade.

Posted: Wed Feb 01, 2017 7:28 pm
by Toxic17
mcrossley wrote:
Phil23 wrote:Got stuck there as well, as no new png's are created, they are made on the fly, by the .htaccess.


The PHP scripts return the image data to the browser, it isn't stored anywhere. The .htaccess file just translates "image" file names into script names, so they look like regular images to your browser - and can use the same filenames for the images so existing pages/scripts for Cumulus 1 continue to work.


thanks for the info Mark. unfortunately, I cannot get the popups to display the graph, yet the graph will display if you call the filename via a browser.

https://www.conligwx.org/images/graphPress.php

it maybe due to incompatibility between coding and PHP 7.1.1 I guess.

Re: Steelseries Upgrade.

Posted: Wed Feb 01, 2017 10:52 pm
by mcrossley
You have the gauges loading the graphs from...
/share/CACHEDEV1_DATA/htdocs/weather/images/temp.png
but they are here...
/images/temp.png

You seem to have a problem with the JSON data files at the moment.

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 8:03 am
by Toxic17
Finally its working! had the wrong relative path for the JSON files. Thanks Mark.

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 8:20 am
by Phil23
Toxic17 wrote:Finally its working! had the wrong relative path for the JSON files. Thanks Mark.


Hmm,

Not seeing it here in Aus.
Getting your tool tip window; after a Ctrl-F5 refresh; been plagued by ISP's proxy servers of late, but no graphic.

Do you have it live yet, or only on a test site.

Phil.

Capture.JPG

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 8:35 am
by Phil23
Scrap my last post.
10 minutes later, another refresh; now it's working.....

Capture.JPG

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 8:38 am
by Toxic17
They are working, just the WIndRose popup is stretched. what did you do to make that normal size?

I do use Zend OPCache, which maybe interfering with it. I'll look into excluding these scripts if possible.

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 8:59 am
by Phil23
Toxic17 wrote:They are working, just the WIndRose popup is stretched. what did you do to make that normal size?


Posted my fix over in the other thread.

http://sandaysoft.com/forum/viewtopic.php?f=27&t=13189#p122836

See the 3rd last code in the block of code I posted in that thread.

Code: Select all

         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip


Phil.

Re: Steelseries Upgrade.

Posted: Thu Feb 02, 2017 9:37 am
by Toxic17
Phil23 wrote:

Code: Select all

         $('#imgtip10_img').css({width: 400, height: 400}); //Re-size WindRose tip


Phil.


Excellent, thanks for that Phil.

I'll add a blacklist to php.ini for Zend Opcache to ignore /images/graph*.php files, so they update each time they are called rather than a possibility of Zend using its cache.