github138 / myRT-contribs

my RackTables contribs
20 stars 3 forks source link

"PHP message: PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /opt/racktables/plugins/snmpgeneric.php:1082 #8

Open McTuron opened 2 years ago

McTuron commented 2 years ago

Hi, I installed a brand new copy of racktables 0.22.0 on rocky linux 9 with php 8.1, using php-fpm and nginx.

The only thing that I cannot get to work is snmpgeneric, it just shows a blank page after I fill in all the details and click on "show interfaces".

my nginx error.log file has these entries: 2022/09/24 04:41:09 [error] 329626#329626: *162 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /opt/racktables/plugins/snmpgeneric.php:1082 Stack trace:

0 /opt/racktables/plugins/snmpgeneric.php(1082): implode()

1 /opt/racktables/wwwroot/index.php(35): snmpgeneric_tabhandler()

2 {main}

thrown in /opt/racktables/plugins/snmpgeneric.php on line 1082" while reading response header from upstream, client: 192.168.50.1, server: racktables.kinderhaus-elmshorn.net, request: "POST /index.php?page=object&tab=snmpgeneric&object_id=1&hl_ip=192.168.50.1&debug_mode=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-racktables.sock:", host: "racktables.xxxxxxxxx.net", referrer: "http://racktables.xxxxxxxxx.net/index.php?page=object&tab=snmpgeneric&object_id=1&hl_ip=192.168.50.1&debug_mode=1"

How can I debug that to find out what is wrong?

pvtex commented 1 month ago

edit the file snmpgeneric.php and change line 1082 to

$newsnmpstr = implode (":", $snmpvalues);