Hi. Since yesterday my LibreNMS console does not show the graphics. When I try to access through the URL it shows the PNG file in machine code. Some like this:
Yes, in different browsers (IE, Edge, Chrome, FF)
Yes, in all pages, include the mini graphs.
We apply this change (PNG to SVG) and now we can see the images when copy and paste the URL directly in the browser, but only when we replace the “amp;” in the original URL. Example:
Yesterday, all the URLs in the HTML file of the console did not have the “amp;” They only had “&”. Do you know if this parameterization is configured in any configuration file?
@cjals Can you provide info on how to reproduce your issue? What url are you on when you try to access graphs? Do you use a subdirctory or reverse proxy?
The URL we are trying to access is the one that is in the attribute data-original, inside img tag.
For example:
[…] <img class="lazy img-responsive" data-original="**http://librenms.domain.com/graph.php?type=device_conns&device=25&height=158&width=339&from=1558508100**" style="border:0;" src="">
[…]
By the way, if we acces to the same URL adding “&debug” it is showing image with the graph.
In this case, if we inspect html code we can see the image encoded in Base64:
I have set: $config['enable_lazy_load'] = false; in config. php, now the html code for the graphs are different: <img class="img-responsive" src="http://librenms.domain.com/graph.php?height=158&width=339&to=1558624200&id=1156&type=port_bits&from=1558019400" style="border:0;">
In the javascript console now we do not have any error, before config.php change we had this: Error en el mapeo fuente: SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data URL del recurso: http://librenms.cdrsbg.com/js/jquery.min.js URL del mapa fuente: jquery-1.10.2.min.map
Can you access librenms by IP address , same issue ?
If I access librenms by IP address I have the same result
_ If you force the & for png, does png work or still corrupt ?_
If I force the & it does not show any code or image, it shows a blank page.
Do you have any lines in your php.ini (locate via php --ini) that match “arg_separator” ?
I have two lines commented: ;arg_separator.output = "&" ;arg_separator.input = ";&"
It’s like the graph.php is not sending the base64 encoded image.
Maybe try the monthly release to check it works again, and then compare the exact differences to the latest daily branch or are you sure its only the & part?(although i think the monthly is due to upgrade soon)
We have resolved it, and we are under investigation because we don’t know why now is showing graphs correctly.
We have reformatted php.ini file and now is working, we only removed all comments and spaces in order to be more readable, after that graphs are showing up.