|
|
| Author |
Message |
sker
Joined: 31 Jul 2007 Posts: 6
|
Posted: Thu Mar 20, 2008 4:53 am Post subject: Refresh of weathermaps in ver 0.95b |
|
|
I have installed the new version of weathermap 095b and have found an issue with the maps updating . I have set the map rendering to the default of every poll cycle and while the thumbnails do update , when you click on the thumbnail the png is not displayed just a red X in the top left. When I look at the properties of the failed png it is pointing to http://mywebserverroot/plugins/weathermap/weathermap-cacti-plugin.php? which is the incorrect path to the PHP file . The correct path should be http://mywebserverroot/cacti/plugins/weathermap/weathermap-cacti-plugin.php?
If I run a recalculate maps from the weathermaps console the file is displayed correctly and the PNG path is correct.
I think the problem is in the poller-common.php file in libs but I'm not very good on debuging code so any help would be appreciated.
I am running
Cacti v0.8.7b
PHP 5.2.5.5
Window 2003 server with IIS
Plugin arch ver2
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Thu Mar 20, 2008 6:53 am Post subject: |
|
|
Hang on - the *same* link on the thumbnail changes it's URL when you use Recalculate Now?
It doesn't even use the full url to the plugin in the HTML, it's just a relative URL: weathermap-cacti-plugin.php?action=viewmap&id=....
Could you clarify? and please check that using Recalculate Now hasn't changed permssions for the output directory too.
|
|
| Back to top |
|
 |
sker
Joined: 31 Jul 2007 Posts: 6
|
Posted: Thu Mar 20, 2008 11:08 am Post subject: |
|
|
Yes thats exactly the problem depending on how the PNG update was done depends on where the "relative" URL points
I have checked the file permissions on the files both auto generated and generate now and they are the same regardles. The thumbnails work fine in both cases
| Description: |
|
| Filesize: |
50.52 KB |
| Viewed: |
1120 Time(s) |

|
| Description: |
|
| Filesize: |
57.43 KB |
| Viewed: |
1120 Time(s) |

|
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Thu Mar 20, 2008 12:20 pm Post subject: |
|
|
Then I guess you have a browser bug, because as I said, weathermap doesn't put *any* path in there.
Does the URL for the weathermap tab/page itself change?
|
|
| Back to top |
|
 |
sker
Joined: 31 Jul 2007 Posts: 6
|
Posted: Thu Mar 20, 2008 4:58 pm Post subject: |
|
|
The Weathermap Tab remains at the correct path. I have tried this from several browsers incudind the server console and the same everywhere.
Is it possible to hard code/define the ['url_path'] in one of the PHP files to test , if so where ? if not any ideas casue every thing else seems to work great except the update.
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Fri Mar 21, 2008 8:09 am Post subject: |
|
|
I just realised that I was talking about the thumbnail images and you were talking about the full-size images behind that.
You're right - it seems that in command-line situations, like the poller, the PIA gets the url_path wrong. This was a problem once before with an old PIA, and I know there are plenty of folks with this issue on PIA 2.0.
Try this:
change line 96 of poller-common.php from
| Code: |
$wmap->imageuri = $config['url_path'].'plugins/weathermap/weathermap-cacti-plugin.php?action=viewimage&id='.$map['filehash']."&time=".time();
|
to
| Code: |
$wmap->imageuri = 'weathermap-cacti-plugin.php?action=viewimage&id='.$map['filehash']."&time=".time();
|
|
|
| Back to top |
|
 |
sker
Joined: 31 Jul 2007 Posts: 6
|
Posted: Tue Mar 25, 2008 7:05 am Post subject: |
|
|
Thanks thats fixed the problem
Great plugin by the way
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Tue Mar 25, 2008 8:44 am Post subject: |
|
|
cool.
and I believe PIA 2.1 fixes this generally, by not trying to guess your url_path anymore.
|
|
| Back to top |
|
 |
|