stopped working

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
shadow
Posts: 17
Joined: Tue Dec 10, 2002 4:48 am

stopped working

Post by shadow »

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?
shadow
Posts: 17
Joined: Tue Dec 10, 2002 4:48 am

upgraded everything

Post by shadow »

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
shadow
Posts: 17
Joined: Tue Dec 10, 2002 4:48 am

Post by shadow »

on 0.8 Im getting this

Notice: Undefined index: sess_user_id in /export/www/cacti2.telecom1.com/graph_view.php on line 91
shadow
Posts: 17
Joined: Tue Dec 10, 2002 4:48 am

Post by shadow »

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)
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

As far as I know if you have older version of cacti installed you can just upgrade to 0.6.8a. This process will update tables structure and preserve your data in place.

- bulek
shadow
Posts: 17
Joined: Tue Dec 10, 2002 4:48 am

Post by shadow »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest