Prob when i launch http://ip_addr/cacti/ for the first time
Moderators: Developers, Moderators
Prob when i launch http://ip_addr/cacti/ for the first time
Hi,
I'm french and i will test cacti on a server RH enterprise 4.0.
I've installed all necessaries package (php,mysql,php-mysql,net-snmp,rrdtool,...)
When I launch http://ip_addr/cacti/
it return :
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
I verified config.php and i specified all parameters
database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password";
and with webmin, i've created a databae cacti with user cactiuser
When i open error.log of httpd
I see :
PHP Warning : mysql_connect():access denied for user 'cactiuser'@'localhost' (using password=yes) in /opt/administration/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Have you an idea??
reagrds and sorry for my bad english
David
I'm french and i will test cacti on a server RH enterprise 4.0.
I've installed all necessaries package (php,mysql,php-mysql,net-snmp,rrdtool,...)
When I launch http://ip_addr/cacti/
it return :
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
I verified config.php and i specified all parameters
database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password";
and with webmin, i've created a databae cacti with user cactiuser
When i open error.log of httpd
I see :
PHP Warning : mysql_connect():access denied for user 'cactiuser'@'localhost' (using password=yes) in /opt/administration/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Have you an idea??
reagrds and sorry for my bad english
David
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Did you follow the instructions in http://www.cacti.net/downloads/docs/htm ... _unix.html to create the cacti database? You may have to change userid/password of that examples to meet your needs.
Reinhard
Reinhard
SELinux is a distribution.....??? no
Disable SELinux, I don't understand....
I would like to test by command :
[root@cacti /]#/usr/bin/php /opt/administration/cacti/poller.php
return :
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
Content-type: text/html
X-Powered-By: PHP/4.3.9
09/30/2005 09:37:23 AM - SYSTEM STATS: Time:1.0307 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[root@cacti /]# PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
I copy my file /usr/lib/php4/mysql.so to msql.so and i test, return :
[root@cacti /]# /usr/bin/php /opt/administration/cacti/poller.php
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
...............
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
.....
In /opt/administration/cacti/log/error.log, I've :
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Time: 0.1070 s, Theads: N/A, Hosts:
What's the problem ??
regards
david
Disable SELinux, I don't understand....
I would like to test by command :
[root@cacti /]#/usr/bin/php /opt/administration/cacti/poller.php
return :
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
Content-type: text/html
X-Powered-By: PHP/4.3.9
09/30/2005 09:37:23 AM - SYSTEM STATS: Time:1.0307 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[root@cacti /]# PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
I copy my file /usr/lib/php4/mysql.so to msql.so and i test, return :
[root@cacti /]# /usr/bin/php /opt/administration/cacti/poller.php
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
...............
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
.....
In /opt/administration/cacti/log/error.log, I've :
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Time: 0.1070 s, Theads: N/A, Hosts:
What's the problem ??
regards
david
I verify my files and I 've in /etc/php.d/ mysql.ini with the content :
extension=mysql.so
That's normal when i execute
[root@cacti /]#/usr/bin/php /opt/administration/cacti/poller.php
return
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
...............
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
And why i've this lines in my file error .log of the directory /cacti/log/
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Time: 0.1070 s, Theads: N/A, Hosts:
regards
David
extension=mysql.so
That's normal when i execute
[root@cacti /]#/usr/bin/php /opt/administration/cacti/poller.php
return
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
...............
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
And why i've this lines in my file error .log of the directory /cacti/log/
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[3] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[4] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[5] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[6] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Host[1] DS[7] WARNING: Result from CMD not valid. Partial Result:
09/30/2005 09:40:01 AM - CMDPHP: Poller[0] Time: 0.1070 s, Theads: N/A, Hosts:
regards
David
For me (maybe i'm wrong),you try to load two time
mysql extension.
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
This warning meen that you try to load an extension you don't have install,
but msql extension is not required to run cacti.
You have copy /usr/lib/php4/mysql.so to msql.so, so now your system
try to load two time mysql.so whith different name.
Just remove or move your msql.ini from /etc/php.d/
mysql extension.
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0
This warning meen that you try to load an extension you don't have install,
but msql extension is not required to run cacti.
You have copy /usr/lib/php4/mysql.so to msql.so, so now your system
try to load two time mysql.so whith different name.
Just remove or move your msql.ini from /etc/php.d/
I have the graphs in cacti but without data....
In graph debug mod, rrdtool ok....
in crontab, I've
*/5 * * * * cactiuser /usr/bin/php /opt/administration/cacti/cmd.php > /dev/null 2&1
I've modified rights of folder rra and log (cactiuser)
When i execute /usr/bin/php /opt/administration/cacti/cmd.php returns
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
........
........
........
........
PHP Warning: Function registration failed - duplicate name - mysql_numrows in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listdbs in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listtables in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listfields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_db_name in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_dbname in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_tablename in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_table_name in Unknown on line 0
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
I think it's for that i haven't data in my graphs......
Have you an idea??
regards
In graph debug mod, rrdtool ok....
in crontab, I've
*/5 * * * * cactiuser /usr/bin/php /opt/administration/cacti/cmd.php > /dev/null 2&1
I've modified rights of folder rra and log (cactiuser)
When i execute /usr/bin/php /opt/administration/cacti/cmd.php returns
PHP Notice: Constant MYSQL_ASSOC already defined in Unknown on line 0
PHP Notice: Constant MYSQL_NUM already defined in Unknown on line 0
PHP Notice: Constant MYSQL_BOTH already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_COMPRESS already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_SSL already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_INTERACTIVE already defined in Unknown on line 0
PHP Notice: Constant MYSQL_CLIENT_IGNORE_SPACE already defined in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_connect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_pconnect in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_close in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_select_db in Unknown on line 0
........
........
........
........
PHP Warning: Function registration failed - duplicate name - mysql_numrows in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listdbs in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listtables in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_listfields in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_db_name in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_dbname in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_tablename in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - mysql_table_name in Unknown on line 0
PHP Warning: mysql: Unable to register functions, unable to load in Unknown on line 0
I think it's for that i haven't data in my graphs......
Have you an idea??
regards
Who is online
Users browsing this forum: No registered users and 0 guests