Re: cacti 0.8.8b +thold 0.5

John Horne <[email protected]> Fri, 13 Jun 2014 10:05:46 +0100
Newsgroups gmane.network.cacti.user
Organization Plymouth University
Message-ID <[email protected]>
On Thu, 2014-06-12 at 20:10 +0530, Anant Tickoo wrote:

> >>
> >> On 10.06.2014 19:36, Anant Tickoo wrote:
> >> > guys any one know below error
> >> >
> >> > Fatal error: Call to undefined function settings_version() in
> >> > /var/www/html/plugins/thold/setup.php on line 120
> >> >
Hello,

Well the code in thold/setup.php shows:

=================
    if (!function_exists('settings_version')) {
        if (file_exists($config['base_path'] .
'/plugins/settings/setup.php')) {
            include_once($config['base_path'] .
'/plugins/settings/setup.php');
            if (!function_exists('settings_version')) {
                return false;
            }
        }
    }
    $v = settings_version();                  (this is line 120)
=================

So there is a check that the function exists, and if it doesn't then it
loads the settings/setup.php file. In that file is a definition of
'settings_version'.

However, I don't think the code above is right anyway. If the function
doesn't exist, and the settings/setup.php file doesn't exist, then the
code still drops through to line 120 (and give the above error). Surely
it should return false instead.

In your case I would say initially check that the settings/setup.php
file exists (using the 'locate' command is probably easiest). Then check
that it does contain the settings_version definition.

We are using the same versions of cacti, thold and settings as you, but
are running them on CentOS 6.5 and so php version 5.3.3. I doubt that
makes a difference to this problem though.



John.

-- 
John Horne                   Tel: +44 (0)1752 587287
Plymouth University, UK


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems