[op5-users] problems when running install_scripts/ninja_db_init.sh /usr/local/nagios/addons/ninja
Tom Welsh
twelsh37 at gmail.com
Thu Nov 26 10:03:04 CET 2009
Hi List,
I'm having problems in the final stages of installing Ninja.
System setup as follows
OS - Fedora Core 11
Nagios - 3.2.0
Merlin - 0.6.4
Ninja - 0.3.2
mysql - 5.1.37
When i run
install_scripts/ninja_db_init.sh /usr/local/nagios/addons/ninja
I get the following error
---------------<SNIP>---------------
root at io ninja]#
install_scripts/ninja_db_init.sh /usr/local/nagios/addons/ninja
Installing database tables for Ninja GUI
Importing users from cgi.cfg
PHP Warning: mysql_fetch_array(): supplied argument is not a valid
MySQL result resource
in /usr/local/nagios/addons/ninja/cli-helpers/htpasswd-import.php on
line 42
query 'INSERT INTO users(username, password_algo, password)
VALUES('welsht2', 'apr_md5', '$apr1$Ieex6WWx$Jay5SgFKfRq1karg8wrvS0')'
failed with error:
Table 'merlin.users' doesn't exist
query 'INSERT INTO users(username, password_algo, password)
VALUES('nagiosadmin', 'apr_md5', '$apr1$9qN8d2Dw
$WaNiwpp0Yf8RH3w/KPtKV0')' failed with error:
Table 'merlin.users' doesn't exist
query 'INSERT INTO users(username, password_algo, password)
VALUES('guest', 'apr_md5', '$apr1$oTIIfYoz$pQXFL7LiWRPlzCefPlvHG/')'
failed with error:
Table 'merlin.users' doesn't exist
SQL query failed with the following error message;<br />
Table 'merlin.users' doesn't exist<br />
---------------<SNIP>---------------
Having checked the MySql database it is correct, there are mo ninja
tables. All i have are the following
Looking at the htpasswd-import.php it all looks ok
---------------<SNIP>---------------
<?php
class htpasswd_importer
{
private $htpasswd_file =
"/usr/local/nagios/etc/htpasswd.users";
public $overwrite = false;
public $passwd_ary = array();
private $existing_ary = array();
private $db_user = "merlin";
private $db_pass = "merlin";
private $db_name = "merlin";
private $db_port = 3306;
private $db_host = "localhost";
private $db_table = "users";
private $db = false;
---------------<SNIP>---------------
And here is the line it borks at
---------------<SNIP>---------------
42 while ($ary = mysql_fetch_array($result)) {
43 $this->existing_ary[$ary['username']] = array
44 ('hash' => $ary['password'], 'algo' => $ary['password_algo']);
45 }
---------------<SNIP>---------------
As far as i can tell i have changed all the paths i need to to get to
this point.
Any help gratefully received.
I'm so close I can smell the roses.
Regards
Tom
More information about the op5-users
mailing list