Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Undefined variable in cacti...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
slugggerzzz
n00b
n00b


Joined: 07 Mar 2012
Posts: 65
Location: Manchester, UK

PostPosted: Mon Mar 18, 2013 2:51 pm    Post subject: Undefined variable in cacti... Reply with quote

Hello,

I have installed cacti 0.8.7i on gentoo and installed the PIA, all is well.

i get the following errors on the web pages.....

Code:
Notice: Undefined variable: plugins in /var/www/localhost/htdocs/cacti/include/plugins.php on line 31

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/localhost/htdocs/cacti/include/plugins.php on line 31


plugins.php
Code:
<?php

/*
 * Copyright (c) 1999-2005 The SquirrelMail Project Team (http://squirrelmail.org)
 * Licensed under the GNU GPL. For full terms see the file COPYING.
 */

global $plugin_hooks, $plugins_system;
$plugin_hooks = array();
$plugins_system = array('settings', 'boost', 'dsstats');

function use_plugin ($name) {
        global $config;
        if (file_exists($config['base_path'] . "/plugins/$name/setup.php")) {
                include_once($config['base_path'] . "/plugins/$name/setup.php");
                $function = "plugin_init_$name";
                if (function_exists($function)) {
                        $function();
                }
        }
}

/**
 * This function executes a hook.
 * @param string $name Name of hook to fire
 * @return mixed $data
 */

$oldplugins = read_config_option('oldplugins');
$oldplugins = explode(',', $oldplugins);
$plugins = array_merge($plugins, $oldplugins);

/* On startup, register all plugins configured for use. */
if (isset($plugins) && is_array($plugins)) {
        foreach ($plugins as $name) {
                use_plugin($name);
        }
}


Any help would be great.....
_________________
Slugggerzzz ...
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Sun Mar 24, 2013 5:19 am    Post subject: Reply with quote

you can try to look early versions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum