Closed rvstaveren closed 1 year ago
Hi, it works for me with php8.1.
Although the editor crash as soon as I create a link (nodes are OK) with an error 500 { "message": "Server Error: Set APP_DEBUG=true to see details." }
So using su - librenms -c "APP_DEBUG=true /opt/librenms/html/plugins/Weathermap/map-poller.php"
gives me the two attached files (one with nodes only, the other with one link added).
It looks like the links issue is related to imagefilledpolygon()
and imagepolygon()
, although there is although issues with strftime()
, imagefilledrectangle()
, imagerectangle()
and imagestring()
.
If https://librenms/plugins/Weathermap/editor.php is not working (see picture), https://librenms/plugins/Weathermap/xxx.html still works. librenms_weathermap_php81_nolinks.txt librenms_weathermap_php81_withlinks.txt
So using
su - librenms -c "APP_DEBUG=true /opt/librenms/html/plugins/Weathermap/map-poller.php"
gives me the two attached files (one with nodes only, the other with one link added). It looks like the links issue is related toimagefilledpolygon()
andimagepolygon()
, although there is although issues withstrftime()
,imagefilledrectangle()
,imagerectangle()
andimagestring()
.
haven't found the fix for this, changing the link labels from bits > percentages will allow the map to be drawn.
This seems to have been adressed in #82, thanks :)
When trying to use the Weathermap plugin with a LibreNMS (FreeBSD package librenms-22.2.1,1, which uses php 8.0 for its dependencies) I had to make the fixes as made in this pull request.