The Error "(ValueError): mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding,... " is appearing at some people ( not each) with firefox browser after successfully logged-in. It is shown instead of the nagvis website.
The error is coming from using debricated method "mbstring.internal_encoding" in nagvis/share/server/core/ext/php-gettext-1.0.12/gettext.inc at line 170 and it is depricated since PHP5.6.0.
To solve, change the line
return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('mbstring.internal_encoding');
to
return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : mb_internal_encoding();
Edit:
The used "php-php-gettext", included in nagvis/share/server/core/ext seems to be on 1.0.12-5.
I exported all the files from 1.0.12-6 (from debian sid) and replaced them with the former ones in
nagvis/share/server/core/ext/php-gettext-1.0.12.
The corresponding line in gettext.inc this version is:
return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('default_charset');
The Error "(ValueError): mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding,... " is appearing at some people ( not each) with firefox browser after successfully logged-in. It is shown instead of the nagvis website.
The error is coming from using debricated method "mbstring.internal_encoding" in nagvis/share/server/core/ext/php-gettext-1.0.12/gettext.inc at line 170 and it is depricated since PHP5.6.0.
To solve, change the line return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('mbstring.internal_encoding'); to return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : mb_internal_encoding();
Edit: The used "php-php-gettext", included in nagvis/share/server/core/ext seems to be on 1.0.12-5.
I exported all the files from 1.0.12-6 (from debian sid) and replaced them with the former ones in nagvis/share/server/core/ext/php-gettext-1.0.12.
The corresponding line in gettext.inc this version is: return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('default_charset');
The version 1.0.12-6 solved the issue, too.