new install , blanl page at http://remoteip/cacti
Moderators: Developers, Moderators
new install , blanl page at http://remoteip/cacti
Hello
I was searching in the forum for a while but i have not been able to find something similar:
I just installed cacti, these are the packages I am using (on Fedora 3)
[root@cactitest httpd]# rpm -qa | egrep "apache|httpd|php|mysql|snmp|cacti"
httpd-2.0.52-3
php-pear-4.3.9-3
libdbi-dbd-mysql-0.6.5-9
mod_auth_mysql-20030510-5
mysql-server-3.23.58-13
mysql-3.23.58-13
php-4.3.9-3
net-snmp-5.1.2-11
mysql-devel-3.23.58-13
net-snmp-utils-5.1.2-11
php-snmp-4.3.9-3
php-mysql-4.3.9-3
system-config-httpd-1.3.1-1
mysql-bench-3.23.58-13
httpd-suexec-2.0.52-3
net-snmp-libs-5.1.2-11
cacti-0.8.6c-1
When I go to http://remoteip/cacti I see a blank page. I also see this in /var/log/httpd/error_log
[client 10.100.102.70] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
[client 10.100.102.70] PHP Fatal error: Call to undefined function: cacti_log() in /var/www/html/cacti/lib/database.php on line 51
I created a php file with <?php phpinfo()?> and I see that my pho supports mysql, so mysql is enabled.
I installed everything from rpms. What else could it be?
Regards
fborot
I was searching in the forum for a while but i have not been able to find something similar:
I just installed cacti, these are the packages I am using (on Fedora 3)
[root@cactitest httpd]# rpm -qa | egrep "apache|httpd|php|mysql|snmp|cacti"
httpd-2.0.52-3
php-pear-4.3.9-3
libdbi-dbd-mysql-0.6.5-9
mod_auth_mysql-20030510-5
mysql-server-3.23.58-13
mysql-3.23.58-13
php-4.3.9-3
net-snmp-5.1.2-11
mysql-devel-3.23.58-13
net-snmp-utils-5.1.2-11
php-snmp-4.3.9-3
php-mysql-4.3.9-3
system-config-httpd-1.3.1-1
mysql-bench-3.23.58-13
httpd-suexec-2.0.52-3
net-snmp-libs-5.1.2-11
cacti-0.8.6c-1
When I go to http://remoteip/cacti I see a blank page. I also see this in /var/log/httpd/error_log
[client 10.100.102.70] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
[client 10.100.102.70] PHP Fatal error: Call to undefined function: cacti_log() in /var/www/html/cacti/lib/database.php on line 51
I created a php file with <?php phpinfo()?> and I see that my pho supports mysql, so mysql is enabled.
I installed everything from rpms. What else could it be?
Regards
fborot
duckhead thank you for replying
the database is created (as you can see below, the user cacti exists, the dababase is called cacti and exists too, the password is the same in the config.php file)
[root@cactitest ~]# mysql -u cacti -p
Enter password: ---here I entered ctengine--
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| cacti |
| mysql |
| test |
+----------+
3 rows in set (0.00 sec)
mysql> exit
Bye
[root@cactitest ~]#
these are the entries in the "/var/www/html/cacti/include/config.php" file:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "ctengine";
so this does not seem to be the problem,
the database is created (as you can see below, the user cacti exists, the dababase is called cacti and exists too, the password is the same in the config.php file)
[root@cactitest ~]# mysql -u cacti -p
Enter password: ---here I entered ctengine--
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| cacti |
| mysql |
| test |
+----------+
3 rows in set (0.00 sec)
mysql> exit
Bye
[root@cactitest ~]#
these are the entries in the "/var/www/html/cacti/include/config.php" file:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "ctengine";
so this does not seem to be the problem,
elnino, I did not do that because I saw that the cacti rpm created the database by itself. (I did a "use cacti", then a "show tables" and I saw a lot of stuff, so the rpm did all that)
I am not sure about giving it the permissions to the user cacti (created also by the cacti rpm)
but how can I check that that user has the permissions?
regards
fborot
I am not sure about giving it the permissions to the user cacti (created also by the cacti rpm)
but how can I check that that user has the permissions?
regards
fborot
I havn't installed Cacti via the rpm before, but it does look like the database was created. It wouldnt' hurt to run these commands again just to make sure the user has access to the database:
It looks like your config.php file is ok, so it should start working after this.
Code: Select all
[root@cactitest ~]# mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'ctengine';
mysql> flush privileges;
I checked the file:in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339 and the function mysql_connect() has these are arguments:
$argHostname,$argUsername,$argPassword
I do not see them defined anywhere else in that file.
In the file : /var/www/html/cacti/include/config.php I have these lines:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "ctengine";
but in the file /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php
I do not see any refernece to the usernam, database, userpaswd etc.
Could it be the problem?
Regards
Fabian
$argHostname,$argUsername,$argPassword
I do not see them defined anywhere else in that file.
In the file : /var/www/html/cacti/include/config.php I have these lines:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "ctengine";
but in the file /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php
I do not see any refernece to the usernam, database, userpaswd etc.
Could it be the problem?
Regards
Fabian
Disable SELinux
I ran into the same problem and had to disable SELinux
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Are you running apache in a chroot?
[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]
Disable SELinux
run the sestatus command to tell if it is enabled.
to disable it you can change the /etc/sysconfig/selinux file .
change "selinux=enforcing" to "selinux=disable'
reboot
to disable it you can change the /etc/sysconfig/selinux file .
change "selinux=enforcing" to "selinux=disable'
reboot
thank you mjt
that fixed it !!!!!!!
it was enabled and I set it up to disabled and reboot the pc.
Now , after the cacti installation page, I have the login page , I tried root/rootpasswd, cacti/cacti etc and it was not working.
I tried admin/admin and that worked, it asked me then to create a new passwd which I did.
I do not remember to have seen anywhere the default login/passwd combination for cacti, I just guessed it.
thank you very much guys
fabian
that fixed it !!!!!!!
it was enabled and I set it up to disabled and reboot the pc.
Now , after the cacti installation page, I have the login page , I tried root/rootpasswd, cacti/cacti etc and it was not working.
I tried admin/admin and that worked, it asked me then to create a new passwd which I did.
I do not remember to have seen anywhere the default login/passwd combination for cacti, I just guessed it.
thank you very much guys
fabian
I am running into the same problem on both FC2 and 3. I saw many havg problems on FC3 so I nuked the box and went to 2. At first I got a blank page. Then i applied the patches and I get the following now on FC2 in a webrowser:
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
/var/log/httpd/error_log says:
[client 65.125.32.121] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
selinux=disabled
I can command line long in to MySQL as the cacti user from /include/config.php and it shows the following:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66 to server version: 4.1.11-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| cactidb |
| test |
+----------+
2 rows in set (0.01 sec)
I fixed this last week in FC3, but had no images and gave up. Now in FC2 I get the same error... any ideas?
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
/var/log/httpd/error_log says:
[client 65.125.32.121] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
selinux=disabled
I can command line long in to MySQL as the cacti user from /include/config.php and it shows the following:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66 to server version: 4.1.11-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| cactidb |
| test |
+----------+
2 rows in set (0.01 sec)
I fixed this last week in FC3, but had no images and gave up. Now in FC2 I get the same error... any ideas?
Thanks in advance,
Dave
Dave
Who is online
Users browsing this forum: No registered users and 0 guests