Hi
Ive just run into a weird problem.
Ive had my graphs running for a while now (probably about 150 graphs) until today when it has suddenly just stopped working!
rrd.log is ticking over very slowly, no output when I run cmd.php form cmdline.
I just tried upgrading php to 4.3.1 from 4.2.3 with no luck
load average on the machine is fine, not stressed at all. mysql running fine (could be something to do with indexes but havent looked up how to fix indexes on mysql yet)
Any ideas where else to look?
stopped working
Moderators: Developers, Moderators
upgraded everything
After that problem where it all stopped working I upgraded to mysql 4.0.12 and php to 4.3.0, I also deleted all my previous version of cacti and re-installed all the php files and copied the config.php and all the rra files to their places.
Same compilation options as before with 4.2.3
Now all the scripts run and the cmd.php runs fine with some arbitary errors.
Now Im getting the great
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 352
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: autoscalelog not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 368
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: unitvalue not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 380
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: unitexponentvalue not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 384
etc etc
Now before everyone starts saying mysql not comiled into php .... it is!
<?php
$link = mysql_connect("localhost", "cacti", "xxxxx")
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
mysql_close($link);
?>
Works fine and:
<?php
$link = mysql_connect("localhost", "cacti", "xxxxx");
mysql_select_db("cacti", $link);
$result = mysql_query("SELECT * FROM rrd_ds", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
returns a row count fine.
So php is talking to the database and the correct database.
Any ideas?
Brent
Same compilation options as before with 4.2.3
Now all the scripts run and the cmd.php runs fine with some arbitary errors.
Now Im getting the great
PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 352
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: autoscalelog not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 368
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: unitvalue not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 380
PHP Warning: mysql_result() [<a href='http://www.php.net/function.mysql-resul ... -result</a>]: unitexponentvalue not found in MySQL result index 18 in /export/www/cacti.telecom1.com/include/rrd_functions.php on line 384
etc etc
Now before everyone starts saying mysql not comiled into php .... it is!
<?php
$link = mysql_connect("localhost", "cacti", "xxxxx")
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
mysql_close($link);
?>
Works fine and:
<?php
$link = mysql_connect("localhost", "cacti", "xxxxx");
mysql_select_db("cacti", $link);
$result = mysql_query("SELECT * FROM rrd_ds", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
returns a row count fine.
So php is talking to the database and the correct database.
Any ideas?
Brent
having a lovelly conversation with myself here.
After hitting the PFY for playing around and not remembering what he did to break it in the 1st place, I have now figured out why I was getting the previous errors:
I was running version 0.6.7 and when I reinstalled it was version 0.6.8a which I found had a different database to 0.6.7.
I then tried installing 0.6.7 to match the database but that left me in the same position where I started where it was doing nothing.
So now Im trying 0.6.8a and have installed a new database, only to find that there is no easy way to import all my data from the old database (please someone prove me wrong)
After hitting the PFY for playing around and not remembering what he did to break it in the 1st place, I have now figured out why I was getting the previous errors:
I was running version 0.6.7 and when I reinstalled it was version 0.6.8a which I found had a different database to 0.6.7.
I then tried installing 0.6.7 to match the database but that left me in the same position where I started where it was doing nothing.
So now Im trying 0.6.8a and have installed a new database, only to find that there is no easy way to import all my data from the old database (please someone prove me wrong)
unless I missed something or didnt read the docs properly I was getting
Warning: Supplied argument is not a valid MySQL result resource in <file> on line <x>?
which from the mysql site said it was probably that the sql statement was returning a result of 0 and not completing. I didnt go into detail in the code to see what the statement was though. What I also tried was to dump the old database with just insert values and insert them into the new database which left me getting column number incorrect errors.
Warning: Supplied argument is not a valid MySQL result resource in <file> on line <x>?
which from the mysql site said it was probably that the sql statement was returning a result of 0 and not completing. I didnt go into detail in the code to see what the statement was though. What I also tried was to dump the old database with just insert values and insert them into the new database which left me getting column number incorrect errors.
Who is online
Users browsing this forum: No registered users and 0 guests