Can't Add User Permissions
Moderators: Developers, Moderators
Can't Add User Permissions
I'm running a brand new install of 0.8.7g and cannot add users with permissions to graphs, devices, trees, or graph templates. The drop-downs do not populate with any options.
Any suggestions?
Any suggestions?
Re: Can't Add User Permissions
I should add that on the Add User page (and not the Edit User) page I see:
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 525
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 583
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 643
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 702
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 525
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 583
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 643
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 702
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Can't Add User Permissions
I don't see those errors.
Did you install all available patches?
Are you running PIA?
R.
Did you install all available patches?
Are you running PIA?
R.
Re: Can't Add User Permissions
I just installed all patches and am having the same problem, though the errors seem to have gone away.
Re: Can't Add User Permissions
I'm not using any plugins.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Can't Add User Permissions
Please switch logging verbosity to DEBUG, call the failing user management page and switch logging back. Please provide the related snippet out of your cacti.log file
R.
R.
Re: Can't Add User Permissions
Here's the log:
11/12/2010 02:46:10 PM - WEBUI: Cacti Log Cleared from Web Management Interface
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT local_graph_id, title_cache FROM graph_templates_graph WHERE local_graph_id > 0 AND local_graph_id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=1 AND user_auth_perms.user_id=11) ORDER BY title_cache"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, name FROM graph_templates WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=4 AND user_auth_perms.user_id=11) ORDER BY name"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, name FROM graph_tree WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=2 AND user_auth_perms.user_id=11 ) ORDER BY name"
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Can't Add User Permissions
The error message points to a syntax error, but the statements look fine for me.
Please note the syql server version.
And please try one of those commands from mysql cli and return the exact error messages.
R.
Please note the syql server version.
And please try one of those commands from mysql cli and return the exact error messages.
R.
Re: Can't Add User Permissions
mysql> SHOW VARIABLES LIKE "%version%";
+------------------+---------------------+
| Variable_name | Value |
+------------------+---------------------+
| protocol_version | 10 |
| version | 4.0.18-log |
| version_comment | Source distribution |
+------------------+---------------------+
3 rows in set (0.02 sec)
mysql> SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
mysql> SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
mysql> SELECT id, name FROM graph_templates WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=4 AND user_auth_perms.user_id=11) ORDER BY name;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
Perhaps this is as simple as Cacti is not compatible with mySQL 4?mysql> SELECT id, name FROM graph_tree WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=2 AND user_auth_perms.user_id=11 ) ORDER BY name;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Can't Add User Permissions
In general, we are compatible, see http://docs.cacti.net/manual:087:1_inst ... quirements. We only require mysql 4.1x and up. Better use 5.x as old versions are out of support. I suspect the variable "type" as the source of the error. It may help to use `user_auth_perms`.`type` instead. Please try using cli first.
R.
R.
Re: Can't Add User Permissions
I'll try that and get back to you. Thanks.
Re: Can't Add User Permissions
I just finally got to try adding the `s and still have been met with no success.
Re: Can't Add User Permissions
I actually even tried adding `s around all fields and tables:
mysql> SELECT `id`, CONCAT('',`description`,' (',`hostname`,')') AS `name` FROM `host` WHERE `host`.`id` NOT IN (SELECT `item_id` FROM `user_auth_perms` WHERE `user_auth_perms`.`type`=3 AND `user_auth_perms`.`user_id`=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT `item_id` FROM `user_auth_perms` WHERE `user_auth_perms`
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Can't Add User Permissions
Ok, perhaps there's more to do on that old mysql version. I honestly don't know if e.g. subqueries were not supported
R.
R.
-
- Posts: 1
- Joined: Sun Feb 20, 2011 3:53 am
Re: Can't Add User Permissions
i installed cacti on a windows server....
after several users i created successfully
i now get the same error he get
do you know how can i fix it? :\
after several users i created successfully
i now get the same error he get
Code: Select all
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 525
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 595
Notice: Undefined index: id in C:\Inetpub\wwwroot\cacti\user_admin.php on line 596
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 595
Notice: Undefined index: id in C:\Inetpub\wwwroot\cacti\user_admin.php on line 596
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 643
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 702
Who is online
Users browsing this forum: No registered users and 1 guest