Package: cacti
Version: 0.8.6f-5
Severity: normal

While exporting graph templates, cacti has add the following lines :
        </hash_150009e36f3adb9f152adfa5dc50fd2b23337e>
        Invalid round robin archive.
        <hash_050009f1ac79f05f255c02f914c920f1038c54>
The "invalid round robin" probably means that I have a DS buggy, but
that is not the question.

While trying to import such an XML file, cacti silently fails.

I spent two hours to find the problem, which could be simply wrote on
the interface, or in the "debug" returns of the function. 

The lines to update are in lib/import.php :

function &import_xml_data(&$xml_data) {
  global $config, $hash_type_codes, $hash_version_codes;

  include_once($config["library_path"] . "/xml.php");

  $xml_array = xml2array($xml_data);

  if (sizeof($xml_array) == 0) {
    raise_message(7); /* xml parse error */
    return;
  }

  while (list($hash, $hash_array) = each($xml_array)) {
    /* parse information from the hash */
    $parsed_hash = parse_xml_hash($hash);
    print_r($parsed_hash); print"<pre><br>";

    /* invalid/wrong hash */
    if ($parsed_hash == false) { print "Failure. Failing back to form."; return 
; }
     ^ ^^^^ ^^^^^^^^^ ^^^

Instead of silently "return", a message in the $info_array would be
welcome.

That is a major problem of cacti, btw, the insufficient log level. there
are many many useless errors on log, but I cannot find the errors which
would help me to correct my problems, even if set to "debug".
Take a turn on the verbosity, on each stage of the application would
greatly increase it useablility on complex environments.

Regards.


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-1-386
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages cacti depends on:
ii  apache                       1.3.33-7    versatile, high-performance HTTP s
ii  apache2                      2.0.54-4    next generation, scalable, extenda
ii  apache2-mpm-prefork [apache2 2.0.54-4    traditional model for Apache2
ii  debconf [debconf-2.0]        1.4.30.13   Debian configuration management sy
ii  libapache2-mod-php4          4:4.3.10-15 server-side, HTML-embedded scripti
ii  libphp-adodb                 4.52-1      The 'adodb' database abstraction l
ii  logrotate                    3.7-2       Log rotation utility
ii  mysql-client [virtual-mysql- 4.0.24-10   mysql database client binaries
ii  php4                         4:4.3.10-15 server-side, HTML-embedded scripti
ii  php4-cli                     4:4.3.10-15 command-line interpreter for the p
ii  php4-mysql                   4:4.3.10-15 MySQL module for php4
ii  php4-snmp                    4:4.3.10-15 SNMP module for php4
ii  rrdtool                      1.0.49-1    Time-series data storage and displ
ii  snmp                         5.1.2-6.1   NET SNMP (Simple Network Managemen
ii  ucf                          1.17        Update Configuration File: preserv

Versions of packages cacti recommends:
ii  iputils-ping                3:20020927-2 Tools to test the reachability of 
ii  mysql-server                4.0.24-10    mysql database server binaries

-- debconf information:
* cacti/username: cacti
  cacti/poller_name:
* cacti/mysql_server: localhost
* cacti/webserver: Apache2
* cacti/save_rootpw: true
* cacti/dump_location: /var/cache/cacti/dumps
  cacti/default-poller: cacti
  cacti/upgrade_warning:
* cacti/root_mysql: root
* cacti/no_automagic:
  cacti/no_mysql: false
* cacti/purge_db: true
  cacti/no_mysql_message:
* cacti/database: cacti
  cacti/mismatch:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to