NMIDPHP error

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
jadu489
Posts: 2
Joined: Mon Jul 08, 2013 8:10 am

NMIDPHP error

Post by jadu489 »

Hi phalek

I have installed the nmidPhpip plugin but i am getting the flowing error and jsqury plugin will get disabled automatically
Warning: fopen(/var/www/html/plugins/nmidPhpip/config.php): failed to open stream: Permission denied in /var/www/html/plugins/nmidPhpip/setup.php on line 215 Can't open file

Code: Select all

function nmidPhpip_show_tab () {
	global $config, $user_auth_realms, $user_auth_realm_filenames, $nmidPhpip_tab;
    include_once($config["base_path"] . "/plugins/nmidPhpip/config.php");
	    
    if ( read_config_option('nmidPhpip_showtab') )
    {
        $ourFileName = $config["base_path"] . "/plugins/nmidPhpip/config.php";
        $fh = fopen($ourFileName, 'w') or die("Can't open file");
        fwrite($fh, '<?php $nmidPhpip_tab = TRUE; ?>');
        fclose($fh);        
    }
    else
    {
        $ourFileName = $config["base_path"] . "/plugins/nmidPhpip/config.php";
        [b][u]$fh = fopen($ourFileName, 'w') or die("Can't open file");[/u][/b]
        fwrite($fh, '<?php $nmidPhpip_tab = FALSE; ?>');
        fclose($fh);        
    }
i changed the setup.php as per the instructions where did i a mistake

i am using cacti 0.8.8a .
please

Cacti Version 0.8.8a
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x
PHP Version 5.3.3
SPINE 0.8.8 Copyright 2002-2012 by The Cacti Group
Apache Version Apache/2.2.15 (CentOS)
User avatar
Hipska
Posts: 48
Joined: Tue Oct 09, 2012 2:51 am
Location: Belgium

Re: NMIDPHP error

Post by Hipska »

As the error says, check the file permissions for config.php
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: NMIDPHP error

Post by phalek »

Please, in case of errors post into an existing topic, mail me at support@urban-software.de or PM me. I don't get notified about these errors automatically.

Nevertheless, do this:

Code: Select all

touch /var/www/html/plugins/nmidPhpip/config.php
chmod 666 /var/www/html/plugins/nmidPhpip/config.php
or better:

Code: Select all

touch /var/www/html/plugins/nmidPhpip/config.php
chown apache  /var/www/html/plugins/nmidPhpip/config.php
chmod 600 /var/www/html/plugins/nmidPhpip/config.php
or use www-data instead of apache, depends on the OS you're using.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests