Ok I am having some issues folks getting my graphs to display. I have everything setup and the SQL server is working fine and I am able to login and everything but I am getting no graphs what so ever.
I think I found a hint as to why when I run php graph_view.php
I get an error message each time.
I isolated the error message by running the command
php graph_view.php |grep -i sql
The exact error message I am getting is
PHP Notice: Undefined index: QUERY_STRING in /home/webmaster/web-root/cacti/graph_view.php on line 243
PHP Notice: Undefined index: QUERY_STRING in /home/webmaster/web-root/cacti/graph_view.php on line 246
Line 243 of graph_view.php reads as follows
if (ereg("page=[0-9]+",basename($_SERVER["QUERY_STRING"]))) {
Line 246 of the same file is
$nav_url = basename($_SERVER["PHP_SELF"]) . "?" . $_SERVER["QUERY_STRING"] . "&page=<PAGE>$host_id=" . $_REQUEST["host_id"];
And yes I have already applied all the patches for
this version. I am running cacti 0.8.6g fully
patched from http://www.cacti.net/download_patches.php
all patches were done for this version already and
it has not helped.
This machine is running Slackware 10.2
http://www.slackware.com
php -v
PHP 5.1.1 (cli) (built: Dec 5 2005 05:20:38)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2005 Zend Technologies
rrdtool -V
RRDtool 1.2.11 Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch>
Compiled Mon Dec 5 00:22:14 EST 2005
Just to show you that the SQL server is working fine I can
go to the prompt and get access to the SQL server no problems.
mysql -u cactiuser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 630 to server version: 5.0.16-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Also another issue I am having is that when I go into the Graph Tab
from up at the very top and click on settings up at the very top on the right hand side. The option for "Default Graph Tree" "The default graph tree to use when displaying graphs in tree mode. Is Empty there is nothing in the dropdown box even though I have a good size tree already setup in the Treeview. My Default view is treeview.
Any one have any ideas on how to fix this one. So far I have not been too happy with Cacti It seems to be more trouble then it is worth. It seems like a lot of issues between the SQL server backend and the web front end and getting the SQL server and the web front end to interact right.
Please don't flame me back this is my opinion.
Can some one please help me with these two issues?
Thanks,
Jamie
Error in graph_view.php Line 243 & Line 246
Moderators: Developers, Moderators
I am not sure if this would be an issue or not but before I was getting an error saying that it could not connect to the SQL server I was using the name localhost. So instead I changed it to 127.0.0.1 and cacti has been working since then.
Here is a copy of my include/config.php settings
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cactiuser";
$database_password = "cacti";
I tried changing the $database_hostname back to localhost again
but when you do that you get the error.
Cannot connect to MySQL server on 'localhost'.
Please make sure you have specified a valid MySQL database
name in 'include/config.php'.
And in the apache error_log I get the following message
when I use localhost for the hostname in the config.php
When I go to go to http://192.168.0.1/cacti
I get the error.
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
[Tue Dec 06 15:30:19 2005] [error] [client 192.168.0.253] PHP Warning: mysql_co
nnect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) in /home/webmaster/web-root/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
And yes I have localhost setup in my /etc/hosts file
127.0.0.1 localhost
And there is only a single entry in my /etc/hosts file
for localhost as well so that can't be the issue.
ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.197 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.109 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.108 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.164 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.165 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.160 ms
--- localhost ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4997ms
rtt min/avg/max/mdev = 0.108/0.150/0.197/0.034 ms
As I showed before I have no problem connecting to the SQL server
mysql -u cactiuser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 887 to server version: 5.0.16-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
\mysql>
But what I don't know is that because I am using 127.0.01 that it is causing further issues instead of using localhost I am not sure if this is causing me the other error that I am receiving.
Again if I use 127.0.0.1 I can connect to the database fine no problem.
Can anyone shed any light into this for me?
Jamie
Here is a copy of my include/config.php settings
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cactiuser";
$database_password = "cacti";
I tried changing the $database_hostname back to localhost again
but when you do that you get the error.
Cannot connect to MySQL server on 'localhost'.
Please make sure you have specified a valid MySQL database
name in 'include/config.php'.
And in the apache error_log I get the following message
when I use localhost for the hostname in the config.php
When I go to go to http://192.168.0.1/cacti
I get the error.
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
[Tue Dec 06 15:30:19 2005] [error] [client 192.168.0.253] PHP Warning: mysql_co
nnect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) in /home/webmaster/web-root/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
And yes I have localhost setup in my /etc/hosts file
127.0.0.1 localhost
And there is only a single entry in my /etc/hosts file
for localhost as well so that can't be the issue.
ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.197 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.109 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.108 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.164 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.165 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.160 ms
--- localhost ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4997ms
rtt min/avg/max/mdev = 0.108/0.150/0.197/0.034 ms
As I showed before I have no problem connecting to the SQL server
mysql -u cactiuser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 887 to server version: 5.0.16-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
\mysql>
But what I don't know is that because I am using 127.0.01 that it is causing further issues instead of using localhost I am not sure if this is causing me the other error that I am receiving.
Again if I use 127.0.0.1 I can connect to the database fine no problem.
Can anyone shed any light into this for me?
Jamie
Problem Resolved
Ok it looks like I solved the issue. I downgraded from SQL 5.0.xx
to MYSQL Standard 4.1.15 and it appears to be working fine now. It appears to have been a bug with cacti and SQL 5.0.xx
Incase anyone else is having this problem the link for the
MYSQL Standard 4.1.15 is
http://dev.mysql.com/downloads/mysql/4.1.html
Jamie
to MYSQL Standard 4.1.15 and it appears to be working fine now. It appears to have been a bug with cacti and SQL 5.0.xx
Incase anyone else is having this problem the link for the
MYSQL Standard 4.1.15 is
http://dev.mysql.com/downloads/mysql/4.1.html
Jamie
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
FYI, do a search for mysql 5...
You will find that cacti does not currently support mysql 5.
You will find that cacti does not currently support mysql 5.
[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]
SQL 5.0.xx
Ya well Cacti is just buggy and can't handle SQL 5 they reallyrony wrote:FYI, do a search for mysql 5...
You will find that cacti does not currently support mysql 5.
need to do some serious updates on Cacti to make it support
SQL 5.0.xx
Jamie
Who is online
Users browsing this forum: No registered users and 1 guest