Cacti Debian Install

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

Moderators: Developers, Moderators

heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Cacti Debian Install

Post by heckler40 »

I have installed cacti and all related packages. All appear to be successful. When I type http://ip_addr/cacti into IE or FF it wants me to download the php file. Any recommendations on how to make this work?

I'm running apache 2.0.54, cacti 0.8.6c and deb 3.1r3.

Here's what else I've done:

1) http://ip_addr/ brings up apache default page
2) added AddType application/x-httpd-php .php to both apache2.conf and conf.d/cacti.conf to no avail

TIA!
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

did u installed php4 for apache?


apt-cache search apache2 php
cacti rulez!
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Ok...I'm getting closer. Running adodb 4.72, cacti .8.6h, apache 2.0.55 , php 4.4.2, mysql 5.0.24a.

netmgmt:/usr/share/cacti/site# php poller.php

Fatal error: Call to undefined function: mysql_pconnect() in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 373
netmgmt:/usr/share/cacti/site#

Here are the lines around 373:

function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
{
if (!empty($this->port)) $argHostname .= ":".$this->port;

if (ADODB_PHPVER >= 0x4300)
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
else
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword);
if ($this->_connectionID === false) return false;
if ($this->autoRollback) $this->RollbackTrans();
if ($argDatabasename) return $this->SelectDB($argDatabasename);
return true;

Line 373 is "else" in the above.

Any clues? I've got everything going well so far but obviously no polling because of this. :)

TIA!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may have to enable MySQL within php.ini
Reinhard
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

The extension?

extension=mysql.so is on by default.

Was there anything else???
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

From a command line run:

php -m

Post your results.

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?
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

bcmath
bz2
calendar
ctype
dba
dbx
exif
filepro
ftp
gettext
iconv
mbstring
mime_magic
ncurses
openssl
overload
pcntl
pcre
posix
session
shmop
snmp
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlrpc
yp
zip
zlib
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

apt-cache search php mysql
apt-cache search apache2 mysql
cacti rulez!
wwolkers
Posts: 24
Joined: Thu Sep 14, 2006 6:44 am

Post by wwolkers »

you seem to be missing the php4-mysql package

apt-get install php4-mysql
should fix that
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Unfortunately all of that's already there...

netmgmt:~# dpkg --list | grep php
ii libapache2-mod-php4 4.4.2-1.1 server-side, HTML-embedded scripting languag
ii libphp-adodb 4.72-0.1 The 'adodb' database abstraction layer for p
ii php4-cli 4.4.2-1.1 command-line interpreter for the php4 script
ii php4-common 4.4.2-1.1 Common files for packages built from the php
ii php4-mysql 4.4.2-1.1 MySQL module for php4
ii php4-odbc 4.4.2-1.1 ODBC module for php4
ii php4-pgsql 4.4.2-1.1 PostgreSQL module for php4
ii php4-snmp 4.4.2-1.1 SNMP module for php4
ii php4-sybase 4.4.2-1.1 Sybase / MS SQL Server module for php4

netmgmt:~# dpkg --list | grep mysql
ii libdbd-mysql-perl 3.0007-1 A Perl5 database interface to the MySQL data
ii libmysqlclient15off 5.0.24a-4 mysql database client library
ii mysql-client-5.0 5.0.24a-4 mysql database client binaries
ii mysql-common 5.0.24a-4 mysql database common files (e.g. /etc/mysql
ii mysql-server 5.0.24a-4 mysql database server (current version)
ii mysql-server-5.0 5.0.24a-4 mysql database server binaries
ii php4-mysql 4.4.2-1.1 MySQL module for php4

I've actually gone thru and rebuilt this debian VM on my laptop 5 times. I get this every time. Last night I decided to install php5. I do get mysql registered but I get the same error. :(

mysql is installed...I can login and view the dbs and tables, etc.

Any other ideas!??!?
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Ok...looks like I solved it as I am getting graphs now.

On my test machine at home, I installed (all thru aptitude) php5 and all related, uninstalled php4 and all related. Then, unistalled php5 and then installed php4.

This was done with the "_" in aptitude which removes all conf files.

I then did this on the production machine and it worked tooer!
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Just a little more info...

php -m now shows mysql.

I can run poller.php from the command line successfully.

netmgmt:/usr/share/cacti/site# php poller.php
10/05/2006 10:46:49 AM - SYSTEM STATS: Time:1.0678 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:9 RRDsProcessed:8
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
OK u:0.00 s:0.02 r:0.00
netmgmt:/usr/share/cacti/site#

Another little tidbit. On my home test machine, I did install php5 and uninstall php4. I then tried to login into cacti and got the same error message in my second post. It was only when I reinstalled php4 and uninstalled php5 that I got it to work.
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

u need to install php4
cacti rulez!
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

JJX wrote:u need to install php4
If you look above, php4 was already installed.
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

heckler40 wrote: Another little tidbit. On my home test machine, I did install php5 and uninstall php4. I then tried to login into cacti and got the same error message in my second post. It was only when I reinstalled php4 and uninstalled php5 that I got it to work.
cacti rulez!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests