As recommended by the VALIDATE of LIBRENMS, I updated my version of PHP to 8.1.
Since php 8.1 update (7.3 to 8.1), my weathermap editor doesn’t work. Have you also encountered this problem ?
I have errors like this in several php function :
“Unsupported operand types: string / int”
im having the exact same problem
dont know what to do with this ?
bash-4.2$ php check.php
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /opt/librenms/html/plugins/Weathermap/Weathermap/check.php on line 261
bash-4.2$
bash-4.2$ ./validate.php
Component
Version
LibreNMS
22.8.0-57-g302a989
DB Schema
2022_07_03_1947_add_app_data (244)
PHP
8.1.10
Python
3.6.8
Database
MariaDB 10.5.17-MariaDB
RRDTool
1.4.8
SNMP
5.7.2
====================================
[OK] Composer Version: 2.4.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
bash-4.2$ php check.php
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /opt/librenms/html/plugins/Weathermap/check.php on line 261
bash-4.2$ git pull
Already up-to-date.
php check.php
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /var/www/librenms/html/plugins/Weathermap/check.php on line 261
git pull
Already up to date.
Hi
yes im using the same git repo and on the version as you are
the map editor is not responding when clicking on “map properties” and the updating is still stuck for the maps
bash-4.2$ pwd
/opt/librenms/html/plugins/Weathermap
bash-4.2$ git log | head
commit 697ac3cdb517aedc81d3b0b2e9ae5582234dca54
Merge: 018334a aae81d0
Author: Neil Lathwood [email protected]
Date: Mon Aug 22 20:44:47 2022 +0100
Merge pull request #82 from LoveSkylark/master
Multiple fixes
[OK] Composer Version: 2.4.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
I still have issues after git pull on weathermap plugin too,
error seems to be different depending on what map you are rendering
e.g some you have loads of depreciation warnings, seem to complete, but then i get empty image. Other weathermaps which are more complex i get a php fatal error
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /opt/librenms/librenms/html/plugins/Weathermap/lib/WeatherMapLink.class.php:162
Stack trace:
#0 /opt/librenms/librenms/html/plugins/Weathermap/lib/WeatherMapLink.class.php(426): WeatherMapLink->DrawComments()
#1 /opt/librenms/librenms/html/plugins/Weathermap/lib/Weathermap.class.php(3403): WeatherMapLink->Draw()
#2 /opt/librenms/librenms/html/plugins/Weathermap/weathermap.php(296): WeatherMap->DrawMap()
#3 {main}
thrown in /opt/librenms/librenms/html/plugins/Weathermap/lib/WeatherMapLink.class.php on line 162
[OK] Composer Version: 2.4.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
bash-4.2$
could it be a permission problem? i tried all the known methods here
im running centos7
I’m in the same position as axsis_leet but on php8.1 - basically I can open the editor but nothing happens when click the buttons, also the maps don’t update
[OK] Composer Version: 2.4.2
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] Python wrapper cron entry is not present
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
There’s my validate.php. Am running Ubuntu 20.04 LTS all was fine up until the upgrade to php8.1. Any help on this would be greatly appreciated. Also first time poster so apologies if formatting is incorrect etc. and let me know if you need more information.
I had the same problem and then I discovered that the error is associated with the type of data (BWLABEL ) presented in the links, if you selected BWLABEL bits; it does not present the editor, but if you go to the code and comment or remove it change the default (percentage) you will already have the editor back, after editing back to bit, I’ve been doing this since updating php.
Hate to admit this but it turns out my initial issue where none of the button working in the editor is a browser issue - it doesn’t work in Microsoft Edge (surprise surprise!)
I then had another issue where it wasn’t updating I had to modify the cron job for the map-poller.php execution to the following:
Yeah all my maps are showing utilization fine I just had the issue with them not uodating also I dont get that error when I run the map-poller.php manually.
So I was poking around some more this morning in relation to the maps not showing any link data. If I comment out the $rrdcached in the /opt/librenms/config.php after about 15 minutes my map will return to normal.
I suspect there is a path issue between the $rrdcached or possibly a permissions issue? but there is nothing related in the installation/configuration notes for Weathermap that pertains to rrdcached.