Cacti 0.8.7 and weathermap 0.93 Undefined index?
Moderators: Developers, Moderators
Cacti 0.8.7 and weathermap 0.93 Undefined index?
With cacti 0.8.7, plugin arch 1.3 and weathermap 0.93 I get the following error:
Notice: Undefined index: sess_user_id in /usr/share/cacti/plugins/weathermap/setup.php on line 251
I've seen this on other plugins until I upgraded them to their latest versions.
Any ideas?
Thanks
Notice: Undefined index: sess_user_id in /usr/share/cacti/plugins/weathermap/setup.php on line 251
I've seen this on other plugins until I upgraded them to their latest versions.
Any ideas?
Thanks
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Are you running Cacti with and authentcation method of No Auth?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
He might be and not even know it..
Stupid upgrade bug, my fault...
Stupid upgrade bug, my fault...
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Then again, I suppose the same thing must happen in 0.8.6j if you turn off the built-in authentication? I've never wanted to give the world access to my Cacti, so I've probably never tested that.rony wrote:He might be and not even know it..
Stupid upgrade bug, my fault...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
There is a bug in the upgrade that if you have never saved your Authentication settings, IE, clicked save while on the tab, it will improperly default to "No Authentication" when upgrading to 0.8.7.
This has been repaired in the upgrade scripts, but has little effect on users who have upgraded.
0.8.7a will not have this problem.
This has been repaired in the upgrade scripts, but has little effect on users who have upgraded.
0.8.7a will not have this problem.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
I'm running into a similar problem, I've set cacti auth to none, as I have an external authentication wrapper. Is there an option to use weathermap in this method? I've made a couple of hacks to get rid of the warnings that have come up, but they aren't an ideal fix, and I'm not sure if I'm leaving underlying problems.
thanks
thanks
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
If you have external authentication, how does Cacti know which user you are? Or do you just have all users treated the same?dave99 wrote:I'm running into a similar problem, I've set cacti auth to none, as I have an external authentication wrapper. Is there an option to use weathermap in this method? I've made a couple of hacks to get rid of the warnings that have come up, but they aren't an ideal fix, and I'm not sure if I'm leaving underlying problems.
thanks
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
All the same, admin for everyone. The external wrapper (which is groundwork), would determine if the user is able get to cacti.Howie wrote:If you have external authentication, how does Cacti know which user you are? Or do you just have all users treated the same?dave99 wrote:I'm running into a similar problem, I've set cacti auth to none, as I have an external authentication wrapper. Is there an option to use weathermap in this method? I've made a couple of hacks to get rid of the warnings that have come up, but they aren't an ideal fix, and I'm not sure if I'm leaving underlying problems.
thanks
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
OK, and Cacti sees you as the user called 'admin'? or as 'guest'?dave99 wrote:All the same, admin for everyone. The external wrapper (which is groundwork), would determine if the user is able get to cacti.Howie wrote:If you have external authentication, how does Cacti know which user you are? Or do you just have all users treated the same?dave99 wrote:I'm running into a similar problem, I've set cacti auth to none, as I have an external authentication wrapper. Is there an option to use weathermap in this method? I've made a couple of hacks to get rid of the warnings that have come up, but they aren't an ideal fix, and I'm not sure if I'm leaving underlying problems.
thanks
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
That I'm not sure of, if you disable cacti's builtin auth, does it see the user as anything? (I would think it would be admin, but I'm not sure).Howie wrote:OK, and Cacti sees you as the user called 'admin'? or as 'guest'?dave99 wrote:All the same, admin for everyone. The external wrapper (which is groundwork), would determine if the user is able get to cacti.Howie wrote: If you have external authentication, how does Cacti know which user you are? Or do you just have all users treated the same?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
OK, I'll have a little play. I'm not too surprised that it gets upset, but I'll see if I can see a way to get around it.dave99 wrote:
That I'm not sure of, if you disable cacti's builtin auth, does it see the user as anything? (I would think it would be admin, but I'm not sure).
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
What I've done is go through and replace the instances of
with
Maybe an easy fix would be to query the DB, and if the auth level is set at 0, then to set the session variable to the admin user. That would avoid having to change a config file or edit any of the code. I think anyway, my php skills are pretty non-existent.
Code: Select all
userid=".$_SESSION["sess_user_id"]."
Code: Select all
userid='1'
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I've just taken a look at this, and I still don't quite understand how Cacti is integrated into GWOS.
When you add a new cacti plugin, what user do you need to give the right to, to see the tab?
What your change does is just force the user to always be admin, which generally isn't the 'right thing'. However, I would have expected with auth turned off, that you'd get the guest user as your userid...
When you add a new cacti plugin, what user do you need to give the right to, to see the tab?
What your change does is just force the user to always be admin, which generally isn't the 'right thing'. However, I would have expected with auth turned off, that you'd get the guest user as your userid...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
There are only 2 cacti users in my setup, admin & guest. It appears that guest can only view graphs and nothing more. When adding a plugin, I add the permissions to the admin user. With cacti auth off, it appears the concept of users disappears, the sess_user_id variable just doesn't get set anymore. The authentication I use with groundwork is really secondary to this, it doesn't affect cacti at all, it's tied into apache. As far as cacti knows, it is just sitting there by itself with it's built-in authentication off.
What seems to be a cleaner fix is to put your original file back, and in auth.php add a section that checks if the authentication method is 0, if so then go ahead and set the sess_user_id=1.
What seems to be a cleaner fix is to put your original file back, and in auth.php add a section that checks if the authentication method is 0, if so then go ahead and set the sess_user_id=1.
Who is online
Users browsing this forum: No registered users and 2 guests