[Pkg-cacti-maint] Bug#654352: cacti: Cacti doesn't work after upgrade due to database access error

Michael Reincke michael.reincke at atlas-elektronik.com
Tue Jan 3 08:38:50 UTC 2012

Package: cacti
Version: 0.8.7i-2
Severity: important

Dear Maintainer,

After upgrade to version 0.8.7i-2 cacti is no longer working.
Cacti couldn't connect to database.

After patching  /usr/share/cacti/site/include/global.php
I could cacti get back to work.

The patch is:
<505 pcew80 at reincke:~> diff -u /tmp/global.php
--- /tmp/global.php     2012-01-03 08:27:12.142254227 +0100
+++ /usr/share/cacti/site/include/global.php    2012-01-03 09:22:33.000000000
@@ -30,16 +30,16 @@


-/* Default database settings*/
-$database_type = "mysql";
 /* Default session name - Session name must contain alpha characters */
 $cacti_session_name = "Cacti";

 /* Include configuration */
 include(dirname(__FILE__) . "/config.php");

+/* Default database settings*/
+$database_type = "mysql";
 if (isset($config["cacti_version"])) {
        die("Invalid include/config.php file detected.");

The error due to "default" database access setting in defined in
In the packaged version of global.php the database setting done in
/etc/cacti/debian.php are overwritten by config.php. And so no database access
is possible.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cacti depends on:
ii  apache2                                  2.2.21-5
ii  apache2-mpm-prefork [httpd]              2.2.21-5
ii  dbconfig-common                          1.8.47+nmu1
ii  debconf [debconf-2.0]                    1.5.41
ii  libapache2-mod-php5            
ii  libphp-adodb                             5.12-1
ii  mysql-client-5.1 [virtual-mysql-client]  5.1.58-1
ii  php5                           
ii  php5-cli                       
ii  php5-mysql                     
ii  php5-snmp                      
ii  rrdtool                                  1.4.3-3.1+b3
ii  snmp                                     5.4.3~dfsg-2.4
ii  ucf                                      3.0025+nmu2

Versions of packages cacti recommends:
ii  iputils-ping                     3:20101006-1+b1
ii  logrotate                        3.8.1-1
ii  mysql-server                     5.1.58-1
ii  mysql-server-5.1 [mysql-server]  5.1.58-1

Versions of packages cacti suggests:
pn  php5-ldap  <none>

-- Configuration Files:
/etc/logrotate.d/cacti changed [not included]

-- debconf information:
* cacti/db/app-user: cacti
* cacti/mysql/admin-user: root
* cacti/webserver: Apache2
* cacti/mysql/method: unix socket
  cacti/upgrade-error: abort
  cacti/dbconfig-upgrade: true
  cacti/internal/skip-preseed: false
  cacti/purge: false
  cacti/missing-db-package-error: abort
  cacti/database-type: mysql
  cacti/remove-error: abort
* cacti/db/dbname: cacti
  cacti/upgrade-backup: true
  cacti/install-error: abort
  cacti/internal/reconfiguring: false
* cacti/dbconfig-install: true
  cacti/dbconfig-reinstall: false

-- debsums errors found:
debsums: changed file /usr/share/cacti/site/include/global.php (from cacti package)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cacti_global_php.patch
Type: text/x-diff
Size: 640 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-cacti-maint/attachments/20120103/a5e3321e/attachment.patch>

More information about the Pkg-cacti-maint mailing list