poller MySQL error

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

Moderators: Developers, Moderators

Post Reply
pacon007
Posts: 5
Joined: Tue Oct 16, 2007 2:52 am

poller MySQL error

Post by pacon007 »

Hi all.

Here is the problem I experience:

I run poller as cactiuser and I get the fallowing message:

Code: Select all

cactiuser@ntop01:/usr/share/cacti/site$ ./poller.php

Fatal error: Call to undefined function:  mysql_connect() in /usr/share/cacti/si                                              te/lib/adodb/drivers/adodb-mysql.inc.php on line 339
When I access the file to check what it is wrong I see:

Code: Select all

// returns true or false
        function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
        {
                if (ADODB_PHPVER >= 0x4300)
                       $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
                                                                [b]$this->forceNewConnect,$this->clientFlags);
                else if (ADODB_PHPVER >= 0x4200)[/b]
                        $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
                                                                                                $this->forceNewConnect);
                else
                        $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword);

                if ($this->_connectionID === false) return false;
                if ($argDatabasename) return $this->SelectDB($argDatabasename);
                return true;
        }
In bold line 339.
Can anybody help me?? I don't know much about MySQL.

Thanks,
User avatar
N3NCY
Cacti User
Posts: 260
Joined: Thu Sep 22, 2005 7:50 pm
Location: Landenberg, PA
Contact:

Post by N3NCY »

Do you have MySQL (and the MySQL client) installed?

Also, I am thinking you may need "pear's DB" installed.
Try this command:
pear install DB
Thank you,

Ernie
http://www.NMSWorld.com
[b]Dual Zeon Dual Core 2.6Ghz / 8GB RAM / 4x15k RPM SATA RAID5[/b]
[b]Cacti Version[/b] - 0.8.7b
[b]Poller Type[/b] - cactid 0.8.7 with Boost v1.7
[b]Server Info[/b] - FreeBSD 7.0-RELEASE
[b]Web Server[/b] - Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8
[b]PHP[/b] - 5.2.6
[b]MySQL[/b] - 5.0.51b Mod: poller_output ENGINE = MEMORY
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.4.1
[b]Plugins[/b] - Host Info (hostinfo - v0.2), Update Checker (update - v0.3), Network Tools (tools - v0.2), FlowView (flowview - v0.3), Read-only Devices Tab (devices - v0.4), Network Discovery (discovery - v0.8.3), Syslog Monitoring (syslog - v0.5.2), Thresholds (thold - v0.3.9), Device Monitoring (monitor - v0.8.2), PHP Network Weathermap (weathermap - v0.941), SuperLinks (superlinks - v0.72), Report Creator (reports - v0.1b)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests