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    


path/parm-problem, and mysql trouble

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






PostPosted: Wed Jun 11, 2003 6:20 am    Post subject: path/parm-problem, and mysql trouble Reply with quote

Hi there,

I'm completely new to cacti, so please bare with me if my problems are "not hard to fix".

I just installed cacti and got it running (more or less), but have a problem with cmd.php it seems.

All my graphs are there, but empty, and didn't appear until i did :
php cmd.php
as root. Changed some permissions etc, and got it working with user "cacti". Problem is that it will only run if i'm inside the cacti-dir (/home/httpd/htphp /home/httpd/htdocs/cacti/cmd.php
testing
Warning: rrdtool_function_create(include/config.php): failed to open stream: No such file or directory in /home/httpd/htdocs/cacti/include/rrd_functions.php on line 86

Warning: rrdtool_function_create(): Failed opening 'include/config.php' for inclusion (include_path='.:/usr/lib/php') in /home/httpd/htdocs/cacti/include/rrd_functions.php on line 86

**snipped**

docs/cacti). So i assume it doesn't run properly from cron. this is what i get :


Another thing is that when i run it, it serves me all sorts of error-msgs :

cacti $ php cmd.php
ping: bad number of packets to transmit.
mysqladmin: connect to server at '-u' failed
error: 'Unknown MySQL Server Host '-u' (1)'
Check that mysqld is running on -u and that the port is 3306.
You can check this by doing 'telnet -u 3306'
sh: -c: line 2: syntax error near unexpected token `('
sh: -c: line 2: `Warning: main(../include/config.php): failed to open stream: No such file or directory in /home/httpd/htdocs/cacti/scripts/sql.php on line 4'
wc: /var/log/httpd/access_log: No such file or directory

So, anyone got any suggestion?

cheers
Andip
Back to top
andip



Joined: 11 Jun 2003
Posts: 3

PostPosted: Wed Jun 11, 2003 6:29 am    Post subject: Reply with quote

sorry abvout that last posting.. it got all jumbeled up.. i'll repost here.

I just installed cacti and got it running (more or less), but have a problem with cmd.php it seems.

All my graphs are there, but empty, and didn't appear until i did :
php cmd.php as root. Changed some permissions etc, and got it working with user "cacti". Problem is that it will only run if i'm inside the cacti-dir (/home/httpd/htdocs/cacti). So i assume it doesn't run properly from cron. This is what i get :
php /home/httpd/htdocs/cacti/cmd.php
Warning: rrdtool_function_create(include/config.php): failed to open stream: No such file or directory in /home/httpd/htdocs/cacti/include/ rrd_functions.php on line 86

Warning: rrdtool_function_create(): Failed opening 'include/config.php' for inclusion (include_path='.:/usr/lib/php') in /home/httpd/htdocs/cacti/ include/rrd_functions.php on line 86

**snipped**

Another thing is that when i run it, it serves me all sorts of error-msgs :

cacti $ php cmd.php
ping: bad number of packets to transmit.
mysqladmin: connect to server at '-u' failed
error: 'Unknown MySQL Server Host '-u' (1)'
Check that mysqld is running on -u and that the port is 3306.
You can check this by doing 'telnet -u 3306'
sh: -c: line 2: syntax error near unexpected token `('
sh: -c: line 2: `Warning: main(../include/config.php): failed to open stream: No such file or directory in /home/httpd/htdocs/cacti/scripts/sql.php on line 4'
wc: /var/log/httpd/access_log: No such file or directory

So, anyone got any suggestion?

cheers
andip
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2235
Location: Carlisle, PA

PostPosted: Wed Jun 11, 2003 11:20 am    Post subject: Reply with quote

Running cmd.php from an arbitrary location *should* work, so I guessing that something is different about your configuration. Do you have an 'include_path' defined in your php.ini file? If so, it might be causing problems.

What if you made your cron entry:

Code:
cd /home/httpd/htdocs/cacti; php cmd.php


Most of the errors that you are seeing from cmd.php's output is due to things not being installed on your system. For instance you may want to disable your 'system_webhits' and 'server_mysql' data sources.

-Ian
Back to top
Guest






PostPosted: Fri Jun 13, 2003 7:45 am    Post subject: Reply with quote

Hi,
What is it you mean could be different about my configuration? I do not
have the include_path in php.ini (it's there, but commented out)

Anyway, i got a friend of mine to look at it, and he complained about he php-code. He gave me a fix, and now things seem to be working properly, so no, there was nothing missing on my system. Thing about the "second" paste i made (concerning cmd.php being run outside the cacti-dir) was fixed (crudely according to my php-friend), by entering :

$oldpath = set_include_path ('/home/httpd/htdocs/cacti/');

at the top of rrd_functions.php.

This is version 0.6.8. i'm not able to make 0.8 work at all, since it stops at some xml-function in the startup, after entering correct paths etc. (not entirely sure, cause i removed it at once, since it wasn't in the usual gentoo-tree)

I'm not sure if this is gentoo-related problems, or if it's me messing something up somewhere (really don't think so, as i've followed the install-doc to the letter). I'd very much like to find out tho. I'm guessing it's a php-thing.

Cheers
Andip
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