Open sathieu opened 8 years ago
me too with stable nagvis 1.8.5
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);
}
*/
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 */
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
I got the same issue. Thanks for the workaround. Still waiting on an official fix
With Nagvis 1.9b2, I have:
and maybe more...