see nothing at http://localhost/cacti

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

Moderators: Developers, Moderators

Post Reply
chchang
Posts: 4
Joined: Sun Jul 23, 2006 10:26 pm

see nothing at http://localhost/cacti

Post by chchang »

I had follow the install manual to install cacti completed
extract the tarball , create DB, create DB user , import database , chown rra, log permission
and I open http://localhost/cacti , it just show nothing at all ....
so I run php cacti/poller.php
here are the error output on my screen
[root@m2 cacti]# php poller.php
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 65
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 66
PHP Warning: main(/adodb/adodb.inc.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(): Failed opening '/adodb/adodb.inc.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(/database.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(): Failed opening '/database.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(/functions.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Warning: main(): Failed opening '/functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Fatal error: Call to undefined function: db_connect_real() in /var/www/html/mrtg/cacti/include/config.php on line 158
Content-type: text/html
X-Powered-By: PHP/4.3.11

after searching related topic in forum , I had already checked selinux was disabled . and I have no idea how to solve this problem ..

PHP : 4.3.11
MySQL: mysql-3.23.58-13
rrdtool:rrdtool-1.0.49-1.1.fc2.fr
cacti: 0.8.6h
michasio
Posts: 36
Joined: Wed Jun 29, 2005 5:17 am

Post by michasio »

Hi,
Try to type /path_to_php/ php /path__to_cacti/cmd.php and then
the same path but please run poller.php
chchang
Posts: 4
Joined: Sun Jul 23, 2006 10:26 pm

Post by chchang »

michasio wrote:Hi,
Try to type /path_to_php/ php /path__to_cacti/cmd.php and then
the same path but please run poller.php
here is the result ..

running cmd.php

[root@m2 ~]# /usr/bin/php /var/www/html/mrtg/cacti/cmd.php
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 65
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 66
PHP Warning: main(/adodb/adodb.inc.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(): Failed opening '/adodb/adodb.inc.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(/database.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(): Failed opening '/database.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(/functions.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Warning: main(): Failed opening '/functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Fatal error: Call to undefined function: db_connect_real() in /var/www/html/mrtg/cacti/include/config.php on line 158
Content-type: text/html
X-Powered-By: PHP/4.3.11

running poller.php

[root@m2 ~]# /usr/bin/php /var/www/html/mrtg/cacti/poller.php
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 65
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 66
PHP Warning: main(/adodb/adodb.inc.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(): Failed opening '/adodb/adodb.inc.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 150
PHP Warning: main(/database.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(): Failed opening '/database.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 151
PHP Warning: main(/functions.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Warning: main(): Failed opening '/functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/include/config.php on line 152
PHP Fatal error: Call to undefined function: db_connect_real() in /var/www/html/mrtg/cacti/include/config.php on line 158
Content-type: text/html
X-Powered-By: PHP/4.3.11
michasio
Posts: 36
Joined: Wed Jun 29, 2005 5:17 am

Post by michasio »

Hi,

Please tell me waht cacti do You have.... source or package?????
If You have source You should change path to php (in cmd file).
But if You have package, after first start, cacti "want to know where is php, rrdtool, etc" Did You change it?????

And Please check permissions. And run poller and cmd from console using cacti account.
chchang
Posts: 4
Joined: Sun Jul 23, 2006 10:26 pm

Post by chchang »

michasio wrote:Hi,

Please tell me waht cacti do You have.... source or package?????
If You have source You should change path to php (in cmd file).
But if You have package, after first start, cacti "want to know where is php, rrdtool, etc" Did You change it?????

And Please check permissions. And run poller and cmd from console using cacti account.
1. source
2. After the last post , I had try to modify the library_path & include_path
in cacti/include/config.php

$config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(_
#$config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(
$config["library_path"] = "/var/www/html/mrtg/cacti/lib/";
#$config["include_path"] = dirname(__FILE__);
$config["include_path"] = "/var/www/html/mrtg/cacti/include/";

and now I can process the installation , and I see admin console finally

But !!
there are still lots of error messages when I run cmd.php ..


[cactiuser@m2 cacti]$ php cmd.php
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 65
PHP Warning: main(/lib/snmp.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/cmd.php on line 42
PHP Warning: main(): Failed opening '/lib/snmp.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/cmd.php on line 42
PHP Warning: main(/lib/poller.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/cmd.php on line 43
PHP Warning: main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/cmd.php on line 43
PHP Warning: main(/lib/rrd.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/cmd.php on line 44
PHP Warning: main(): Failed opening '/lib/rrd.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/cmd.php on line 44
PHP Warning: main(/lib/ping.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/cmd.php on line 45
PHP Warning: main(): Failed opening '/lib/ping.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/cmd.php on line 45
PHP Fatal error: Cannot instantiate non-existent class: net_ping in /var/www/html/mrtg/cacti/cmd.php on line 110
Content-type: text/html
X-Powered-By: PHP/4.3.11

and run php poller.php

[cactiuser@m2 cacti]$ php poller.php
PHP Warning: mb_ereg_replace(): mbregex compile err: premature end of regular expression in /var/www/html/mrtg/cacti/include/config.php on line 65
PHP Warning: main(/lib/poller.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/poller.php on line 38
PHP Warning: main(): Failed opening '/lib/poller.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/poller.php on line 38
PHP Warning: main(/lib/data_query.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/poller.php on line 39
PHP Warning: main(): Failed opening '/lib/data_query.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/poller.php on line 39
PHP Warning: main(/lib/graph_export.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/poller.php on line 40
PHP Warning: main(): Failed opening '/lib/graph_export.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/poller.php on line 40
PHP Warning: main(/lib/rrd.php): failed to open stream: No such file or directory in /var/www/html/mrtg/cacti/poller.php on line 41
PHP Warning: main(): Failed opening '/lib/rrd.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/mrtg/cacti/poller.php on line 41
PHP Fatal error: Call to undefined function: exec_background() in /var/www/html/mrtg/cacti/poller.php on line 133
Content-type: text/html
X-Powered-By: PHP/4.3.11



I am pretty sure the permission of these folders and the path of rrdtool, php....



I try to add new device in cacti admin console and create new graph
and I did add job to crontab of cactiuser , But I see no any graph !!

then , I want to know that happened in cacti , so I check the log file in
Console -> Utilities -> View Cacti Log File

View Cacti Log File [0 Item]

maybe I had no installed GD Lib ?
[cactiuser@m2 cacti]$ rpm -qa |grep gd
php-gd-4.3.11-2.7
gda-odbc-1.0.4-3
gdbm-devel-1.8.0-24
libgda-1.0.4-3
gdbm-1.8.0-24
gdb-6.1post-1.20040607.41
gd-devel-2.0.28-1
gda-postgres-1.0.4-3
gd-2.0.28-1
gdk-pixbuf-gnome-0.22.0-15.0
aspell-gd-0.50-1
gda-mysql-1.0.4-3
sysklogd-1.4.1-22
gdm-2.6.0.5-6
libgda-devel-1.0.4-3
gdk-pixbuf-0.22.0-15.0
gdk-pixbuf-devel-0.22.0-15.0
gd-progs-2.0.28-1
[cactiuser@m2 cacti]$

and maybe I had no load the GD module in PHP ?
[cactiuser@m2 cacti]$ php -m |more
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbx
dio
domxml
exif
ftp
gd
gettext
gmp
iconv
imap
ldap
mbstring
mime_magic
mysql
ncurses
--More--



so , what can I do now :cry: :cry: :cry:
chchang
Posts: 4
Joined: Sun Jul 23, 2006 10:26 pm

Post by chchang »

I had Solved this problem by modify /etc/php.ini

ref http://contribs.org/modules/pbboard/vie ... c&start=15
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests