Giter Club home page Giter Club logo

Comments (5)

mathieuchateau avatar mathieuchateau commented on September 24, 2024

me too with stable nagvis 1.8.5

from centreon-nagvis.

mathieuchateau avatar mathieuchateau commented on September 24, 2024

I did a workaround on my side, waiting for official fix. I am afraid I am not understanding code good enough to know if my changes are correct:

Inside nagvis, line 30 nagvis/share/server/core/functions/debug.php, comment out:

//define('DEBUGSTART',microtime_float());

inside nagvis, like 76, nagvis/share/server/core/functions/html.php change to only declare if not already

if(function_exists('get_error')){
    // my_function is defined
}
else
{
function get_error($key) {
    global $form_errors;
    return isset($form_errors[$key]) ? $form_errors[$key] : array();
}
}

inside centreon, at end of centreon/www/modules/centreon-nagvis/index.php, comment out:

/*
function debug($msg) {
    $fh = fopen(DEBUGFILE, 'a');
    fwrite($fh, utf8_encode(microtime_float().' '.$msg."\n"));
    fclose($fh);
}
*/

from centreon-nagvis.

cemir avatar cemir commented on September 24, 2024

Hi,

same errors for me with Centreon 2.6.6 and NagVis 1.8.5

in addition of mathieuchateau's modifications, I had to comment in file nagvis/share/server/core/functions/debug.php

     67 /*
     68 function microtime_float() {
     69         list($usec, $sec) = explode(' ', microtime());
     70         return ((float)$usec + (float)$sec);
     71 }
     72 */

from centreon-nagvis.

RefreshMyMind avatar RefreshMyMind commented on September 24, 2024

In the root folder of nagvis, run the following:
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/ext/php-gettext-1.0.9/gettext.inc
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/classes/CoreAuthorisationHandler.php
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/classes/CoreSQLiteHandler.php
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/classes/GlobalLanguage.php
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/classes/CoreAuthHandler.php
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/classes/CoreMySQLHandler.php
sed -i -e "s/debug(/debug_nagvis(/g" ./share/server/core/functions/debug.php
sed -i -e "s/microtime_float(/microtime_float_nagis(/g" ./share/server/core/functions/debug.php

from centreon-nagvis.

kozfelipe avatar kozfelipe commented on September 24, 2024

I got the same issue. Thanks for the workaround.
Still waiting on an official fix

from centreon-nagvis.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.