Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


stopped working

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
shadow



Joined: 10 Dec 2002
Posts: 17

PostPosted: Mon Mar 24, 2003 12:14 pm    Post subject: stopped working Reply with quote

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?
Back to top
shadow



Joined: 10 Dec 2002
Posts: 17

PostPosted: Tue Mar 25, 2003 7:06 am    Post subject: upgraded everything Reply with quote

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-result'>function.mysql-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-result'>function.mysql-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-result'>function.mysql-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
Back to top
shadow



Joined: 10 Dec 2002
Posts: 17

PostPosted: Tue Mar 25, 2003 9:56 am    Post subject: Reply with quote

on 0.8 Im getting this

Notice: Undefined index: sess_user_id in /export/www/cacti2.telecom1.com/graph_view.php on line 91
Back to top
shadow



Joined: 10 Dec 2002
Posts: 17

PostPosted: Tue Mar 25, 2003 11:53 am    Post subject: Reply with quote

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)
Back to top
bulek
Cacti Pro User


Joined: 20 May 2002
Posts: 852
Location: Poland

PostPosted: Tue Mar 25, 2003 12:48 pm    Post subject: Reply with quote

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
Back to top
shadow



Joined: 10 Dec 2002
Posts: 17

PostPosted: Wed Mar 26, 2003 4:08 am    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group