Fatal error: Call to undefined function: db_connect() in...

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

Moderators: Developers, Moderators

User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Fatal error: Call to undefined function: db_connect() in...

Post by ervee »

Hi, I can't get Cacti to work on my brand new SuSE 9.2.
I installed cacti and applied all patches etc. used the install documentation, mysql is running and "mysql -u cactiuser -p cacti" works after entering the cacti password.

When I go to the url http://stats/cacti/ it comes up with:
Fatal error: Call to undefined function: db_connect() in /srv/www/htdocs/cacti/lib/database.php on line 110

I can't find out what this is... :(

I have these versions of packages:
# rpm -qa | egrep "apache|httpd|php|mysql|snmp"
apache2-2.0.50-7.2
apache2-mod_fastcgi-2.4.2-2
apache2-mod_perl-1.99_12_20040302-38
apache2-mod_php4-4.3.8-8.3
apache2-prefork-2.0.50-7.2
apache2-worker-2.0.50-7.2
mysql-4.0.21-4.2
mysql-Max-4.0.21-4
mysql-client-4.0.21-4
mysql-shared-4.0.21-4
net-snmp-5.1.2-3
php4-4.3.8-8.3
php4-bz2-4.3.8-8
php4-calendar-4.3.8-8
php4-ctype-4.3.8-8
php4-exif-4.3.8-8
php4-gd-4.3.8-8
php4-gettext-4.3.8-8
php4-iconv-4.3.8-8
php4-mhash-4.3.8-8
php4-mime_magic-4.3.8-8
php4-mysql-4.3.8-8
php4-session-4.3.8-8
php4-snmp-4.3.8-8
php4-zlib-4.3.8-8

I also seached the forum, but I can't find the answer :( Please help.

Thanx
Ralf.
athlonkmf
Posts: 4
Joined: Wed Mar 23, 2005 2:34 pm

Post by athlonkmf »

have you installed php-cli?
User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

I can't find a package for that, but I have the php4 (core files) package installed which says:
suse wrote:This package contains the PHP4 core files, including PHP binary (CLI) and PHP configuration (php.ini). This package must be installed in order to use PHP. Additionally, extension modules and server modules (e.g. for Apache) may be installed.
Can I somehow verify that I have what I need?
User avatar
_pre[PL]
Posts: 12
Joined: Mon Dec 29, 2003 5:25 pm
Location: Poland, Gdynia
Contact:

Post by _pre[PL] »

remove config_php_include_order.patch
User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

My god, how do I do that? I've installed it folowing the manual with "patch -p1 -N < config_php_include_order.patch" but I'm not so familiar with the patch util...

I do have found out that my PHP is ./configured with '--disable-cli'...
Is php-cli required for cacti?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Removing that patch shouldn't make a difference..

Can you email me your /etc/apache2/httpd.conf file?

I'm curious why this error is showing up all of a sudden.
[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
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

I've mailed you a copy of my config files.
User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

Hmmmmz... My mail server's IP is blocked by sorbs so I'm gonna Hotmail it to you... Here it comes!
User avatar
_pre[PL]
Posts: 12
Joined: Mon Dec 29, 2003 5:25 pm
Location: Poland, Gdynia
Contact:

Post by _pre[PL] »

rony wrote:Removing that patch shouldn't make a difference..
When I apply the patch, the error pops up...
When I remove the patch, it is gone...
I tested this several times...
However, I admit it could be something different.

:D
User avatar
branix
Posts: 39
Joined: Sun Mar 14, 2004 10:38 am

Post by branix »

I second what _pre[PL] said. The same happened to me while applying the patches. problem solved when rolling back from the config_php_include_order.patch patch.
User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

Next to the help from rony I'm willing to try this, but I don't know how :oops:
User avatar
_pre[PL]
Posts: 12
Joined: Mon Dec 29, 2003 5:25 pm
Location: Poland, Gdynia
Contact:

Post by _pre[PL] »

ervee wrote:Next to the help from rony I'm willing to try this, but I don't know how :oops:
just copy config.php from the original tarball
User avatar
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

Doh :oops: Why didn't I think of that... :oops:

Anyhiew... IT WORKS!
After replacing the patched config.php with the original from the distribution and changing the password to mach mine, I'm now presented with a "Cacti Installation Guide" introduction.

Rony, are you still going to work out why the patched version doesn't work with my apache2? Would be nice, but if you have better things to do, I understand.

Thanx in advance for all the help!

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

Post by rony »

Um, guess I need to do more testing....

Doesn't make sense..... Unless the patch is corrupted? Hey, I can be wrong sometimes.. :) I will investigate it further tonight.

Sometimes I'm a little hard headed... :)
[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
ervee
Posts: 11
Joined: Wed Mar 23, 2005 2:24 pm

Post by ervee »

Okay, let me know if you want me to test it or something. It's best to use e-mail for that for a quick response.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest