Fatal Error

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

Moderators: Developers, Moderators

Post Reply
Jerrish
Posts: 2
Joined: Wed Jan 19, 2005 3:22 am

Fatal Error

Post by Jerrish »

I'm getting the following error while trying to load the webinterface

Code: Select all

Fatal error: Call to undefined function: cacti_log() in /var/www/html/cacti/lib/database.php on line 51
RedHat 9
cacti-0.8.6c

Advance Thanx
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Reinstall......

You are missing lib/functions.php or have a partial file.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Jerrish
Posts: 2
Joined: Wed Jan 19, 2005 3:22 am

Post by Jerrish »

nope...
it's not working
I checked the lib/function.php and cacti_log is defined is defined there
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Php version?

Code: Select all

php -v
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Well, its not getting included.

Reinstall your include/config.php and remodify it for your enviroment.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Rename the config.php.dist to config.php and then modify your database information. Hopefully this will fix the problem.

The Witness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
tberer
Posts: 10
Joined: Mon Feb 21, 2005 5:17 am

Post by tberer »

I have the same problem on fc3.

After intallation i get an emty page. The error.log shows:

Code: Select all

PHP Fatal error:  Call to undefined function:  cacti_log()
in /var/www/html/cacti/lib/database.php on line 51
Installed Packages:

Code: Select all

cacti-0.8.6c-1 (cacti-0.8.6c.fc3.i386.rpm)
httpd-2.0.52-3.1
php-4.3.10-3.2
php-mysql-4.3.10-3.2
mysql-server-3.23.58-14
tberer
Posts: 10
Joined: Mon Feb 21, 2005 5:17 am

Post by tberer »

According to the thread "PHP Versions 4.3.10 and 5.0.3 >>Stable<<" i tried to downgrade php to version 4.3.9. After reinstalling cacti i still get the same error.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Is Php running in safe_mode?

Check your php.ini files and make sure that safe_mode is off.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
tberer
Posts: 10
Joined: Mon Feb 21, 2005 5:17 am

Post by tberer »

safe_mode is disabled.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tony,

Sounds like the fedora core rpm may have issues.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
merlinx2040
Posts: 2
Joined: Thu Feb 24, 2005 2:00 pm

Post by merlinx2040 »

Hello,

I'm having the exact same problem, after I type http://localhost/cacti/ , all I get is:
Fatal error: Call to undefined function: cacti_log() in /var/www/cacti/lib/database.php on line 51
I'm using:

-Debian Sarge
-cacti-0.8.6c.tar.gz
-php4 (4.3.10-2)
-php4-cgi (4.3.10-2)
-php4-cli (4.3.10-2)
-php4-common (4.3.10-2)
-php4-mysql (4.3.10-2)
-mysql-server (4.0.23-4)

Right now I have 0.8.6b running without problems, any ideas?
rugbyrobboca
Posts: 2
Joined: Tue Apr 23, 2002 9:14 am
Location: Boca Raton
Contact:

resolved the cacti_log function not found

Post by rugbyrobboca »

we had the same problem, kind of a chicken and egg

The configuration file has the database set to cacti but the sql script creates it as cactidb and when cacti trys to connect it errors out and tries to right this to the log. The problem is functions.php that has the function cacti_log is included afterwards.

what we did:

1. move the include_once($config["library_path"] . "/functions.php");
before include($config["library_path"] . "/database.php");

2. second fix the configuration file to point to the correct database
tberer
Posts: 10
Joined: Mon Feb 21, 2005 5:17 am

Post by tberer »

Now it works fine.
Thanks rugbyrobboca.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The config.php.dist will be patched on the web site soon. Thanks!!

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests