[SOLVED] Confusion in config.php

Support for the Plugin Architecture

Moderators: Developers, Moderators

Post Reply
harner
Cacti User
Posts: 75
Joined: Tue Oct 17, 2006 10:21 am
Location: PA, USA

[SOLVED] Confusion in config.php

Post by harner »

I'm rocking the version "i" of the cacti install. I'm trying to configure the plugin architecture so I can get a bunch of programs up and running. I'm noticing the plugins I added are not working and nothing is showing up in the Realm Permissions. I skipped a step on purpose, since I thought it would pick up the subdomain redirect (which it obviously does not). I'm a bit confused as to where I am supposed to add the cacti install directory in the config file.

I used the pre-patched files and just overwrote everything. I'm running OpenSUSE 10.1, Apache2, PHP5, MySQL.

Here is a snippet of ./cacti/include/config.php:

Code: Select all

$URL_PATH = '';
for($i = count($a) - 2; $i > -1; --$i) {
    $URL_PATH .= '../';
    if ($a[$i] === 'plugins') {
        break;
    }
}
$config['url_path'] = implode('/', array_slice($a, 0, $i)) . '/';
define('URL_PATH', $config['url_path']);
Here is what the cactiuser said to use (Example):

Code: Select all

$config['url_path'] = "/projects/cacti/testing/";
My question is, where do I put the url path?
My url path is /srv/www/htdocs/cacti by the way.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I need to update the docs, but as you can see in the release post, its not necessary to make that change anymore.

If you aren't seeing the plugins, its not a problem with that variable in the config. Instead you will want to chech the permissions on the plugins directory and all files / folders under it. You can also check to see if its even loading the plugins setup files by editting any setup.php in a plugin directory, and make some obvious error to see if its even getting there.

BTW, did you use the patch, or the pre-patched files?
harner
Cacti User
Posts: 75
Joined: Tue Oct 17, 2006 10:21 am
Location: PA, USA

Post by harner »

pre-patched. And I have to runt he SQL files once I edit the config, correct?
tdupas
Posts: 17
Joined: Tue Oct 03, 2006 9:05 am

Post by tdupas »

I had a different problem with the new plugin architecture, it didn't "recognise" the path correctly.
It though the path was "http://FQDN/i" for some reason.

I "solved" it the hard way :roll:

Code: Select all

/* This is the URL Path to Cacti's install
   Future versions will only contain the DEFINE, the old variable is currently
   for backwards compatibility */
#if (isset($_SERVER['DOCUMENT_ROOT']))
#       $config['url_path'] = substr(__FILE__, strlen($_SERVER['DOCUMENT_ROOT']), -18);
#else
#       $config['url_path'] = substr(__FILE__, strlen($config["base_path"]), -18);
$config['url_path'] = "/cacti/";
define('URL_PATH', $config['url_path']);
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

tdupas wrote:I had a different problem with the new plugin architecture, it didn't "recognise" the path correctly.
It though the path was "http://FQDN/i" for some reason.
This issue has already been corrected for future downloads of the Plugin Architecture. Just the first few days after release were "broken".
tdupas
Posts: 17
Joined: Tue Oct 03, 2006 9:05 am

Post by tdupas »

glad to hear cigamit, it was indeed the first or second day after the release.
But I didn't thought of a "general bug" at tat time because other people stated that it works.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests