Okay, here's one i can't get my head arround, everytime i add a device to graph tree (or header, or graph), i get those errors
Code: Select all
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1100', SQL:"select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='113'"
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1100', SQL:"INSERT INTO plugin_realms (plugin, file, display) VALUES ('superlinks', 'superlinks-mgmt.php', 'Plugin -> SuperLinks: Manage Pages')'
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1100', SQL:"INSERT INTO plugin_realms (plugin, file, display) VALUES ('superlinks', 'superlinks.php', 'Plugin -> SuperLinks: View Pages')'
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1100', SQL:"INSERT INTO plugin_realms (plugin, file, display) VALUES ('weathermap', 'weathermap-cacti-plugin-mgmt.php', 'Plugin -> Weathermap: Configure/Manage')'
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1100', SQL:"INSERT INTO plugin_realms (plugin, file, display) VALUES ('weathermap', 'weathermap-cacti-plugin.php', 'Plugin -> Weathermap: View')'
11/17/2011 07:54:14 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1100', SQL:"SELECT 1 AS id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'config_arrays' AND ph.name IN ('settings', 'boost', 'dsstats') UNION SELECT pc.id, ph.name, ph.file, ph.function FROM plugin_hooks AS ph LEFT JOIN plugin_config AS pc ON pc.directory=ph.name WHERE ph.status = 1 AND hook = 'config_arrays' AND ph.name NOT IN ('settings', 'boost', 'dsstats') ORDER BY id ASC"
the two select works fine when i exec them in mysql (from command line, as cactiuser)
I also checked the api_plugin_regiter_realm function,
Code: Select all
function api_plugin_register_realm ($plugin, $file, $display, $admin = false) {
$exists = db_fetch_assoc("SELECT id FROM plugin_realms WHERE plugin = '$plugin' AND file = '$file'", false);
print_r($exists); //TEST
if (!count($exists)) {
db_execute("INSERT INTO plugin_realms (plugin, file, display) VALUES ('$plugin', '$file', '$display')");
if ($admin) {
$realm_id = db_fetch_assoc("SELECT id FROM plugin_realms WHERE plugin = '$plugin' AND file = '$file'", false);
$realm_id = $realm_id[0]['id'] + 100;
$user_id = db_fetch_assoc("SELECT id FROM user_auth WHERE username = 'admin'", false);
if (count($user_id)) {
$user_id = $user_id[0]['id'];
$exists = db_fetch_assoc("SELECT realm_id FROM user_auth_realm WHERE user_id = $user_id and realm_id = $realm_id", false);
if (!count($exists)) {
db_execute("INSERT INTO user_auth_realm (user_id, realm_id) VALUES ($user_id, $realm_id)");
}
}
}
}
}
I have no errors in httpd/error_log