Newbie - Post Install Error

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

Moderators: Developers, Moderators

Post Reply
ben.butler@c2internet.net
Posts: 3
Joined: Mon Mar 21, 2005 3:55 pm

Newbie - Post Install Error

Post by ben.butler@c2internet.net »

Hi,

I have installed Cacti on Debian using apt. I have worked through the instructions but now get the following error when conecting to the cacti site using a browser:

Fatal error: Call to undefined function: mysql_connect() in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 338

Anyone got any ideas on what I am missing / done wrong.

Kind Regards

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

Post by TheWitness »

php needs to include mysql support:

php -m

Should contain "mysql" and "snmp".

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?
ben.butler@c2internet.net
Posts: 3
Joined: Mon Mar 21, 2005 3:55 pm

php Modules

Post by ben.butler@c2internet.net »

Hi,

Ok done php -m and I have got both snmp and mysql in the list.

Kind Regards

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

Post by TheWitness »

Post your include/config.php.

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?
ben.butler@c2internet.net
Posts: 3
Joined: Mon Mar 21, 2005 3:55 pm

config.php

Post by ben.butler@c2internet.net »

Hi,

Here you go, thanks for your help btw.

Kind Regards

Ben

<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004 Ian Berry |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| cacti: a php-based graphing solution |
+-------------------------------------------------------------------------+
| Most of this code has been designed, written and is maintained by |
| Ian Berry. See about.php for specific developer credit. Any questions |
| or comments regarding this code should be directed to: |
| - iberry@raxnet.net |
+-------------------------------------------------------------------------+
| - raXnet - http://www.raxnet.net/ |
+-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
@include('/etc/cacti/debian.php');

/* ----- you probably do not need to change anything below this line ----- */

/* this should be auto-detected, set it manually if needed */
$config["cacti_server_os"] = (strstr(PHP_OS, "WIN")) ? "win32" : "unix";

/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");

/* used for includes */
$config["base_path"] = ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__));
$config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
$config["include_path"] = dirname(__FILE__);

/* colors */
$colors["dark_outline"] = "454E53";
$colors["dark_bar"] = "AEB4B7";
$colors["panel"] = "E5E5E5";
$colors["panel_text"] = "000000";
$colors["panel_link"] = "000000";
$colors["light"] = "F5F5F5";
$colors["alternate"] = "E7E9F2";
$colors["panel_dark"] = "C5C5C5";

$colors["header"] = "00438C";
$colors["header_panel"] = "6d88ad";
$colors["header_text"] = "ffffff";
$colors["form_background_dark"] = "E1E1E1";

$colors["form_alternate1"] = "F5F5F5";
$colors["form_alternate2"] = "E5E5E5";

if ((isset($no_http_headers) ? $no_http_headers : false) != true) {
/* we don't want these pages cached */
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

/* initilize php session */
session_start();

/* detect and handle get_magic_quotes */
if (!get_magic_quotes_gpc()) {
function addslashes_deep($value) {
$value = is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value);
return $value;
}

$_POST = array_map('addslashes_deep', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
}

/* make sure to start only only Cacti session at a time */
if (!isset($_SESSION["cacti_cwd"])) {
$_SESSION["cacti_cwd"] = $config["base_path"];
}else{
if ($_SESSION["cacti_cwd"] != $config["base_path"]) {
session_unset();
session_destroy();
}
}
}

/* display ALL errors */
error_reporting(E_ALL);

/* connect to the database server */
include($config["library_path"] . "/adodb/adodb.inc.php");
include($config["library_path"] . "/database.php");
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type);

include_once($config["library_path"] . "/functions.php");
include_once($config["include_path"] . "/config_constants.php");
include_once($config["include_path"] . "/config_arrays.php");
include_once($config["include_path"] . "/config_settings.php");
include_once($config["include_path"] . "/config_form.php");
include_once($config["library_path"] . "/html.php");
include_once($config["library_path"] . "/html_form.php");
include_once($config["library_path"] . "/html_utility.php");
include_once($config["library_path"] . "/variables.php");
include_once($config["library_path"] . "/auth.php");

/* current cacti version */
$config["cacti_version"] = "0.8.6c";

?>
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests