How odd… I poked it a bit, the behaviour is interesting (added line numbers):
1 $mib = 'FOUNDRY-SN-SWITCH-GROUP-MIB'; 2 $config['mibs'][$mib]['enable'] = 1; 3 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.1991.1.1.3'; 4 $config['mibs'][$mib]['mib_dir'] = 'brocade'; 5 $config['mibs'][$mib]['descr'] = ''; Found that commenting out (2) just moves the error to (3), and so on. But, if you comment out (1) instead, thus leaving $mib defined as the previous definition, all the lines 2,3,4,5 are all now suddenly valid. So the issue occurs only once you assign $mib as FOUNDRY-SN-SWITCH-GROUP-MIB in particular. It is ok if you assign it to another MIB name instead. Clearing up that section with comments, moved the issue to another file, but with identical symptoms and behaviour: PHP Fatal error: Uncaught Error: Cannot use a scalar value as an array in /opt/observium/includes/definitions/mibs/force10.inc.php:15 $mib = 'FORCE10-BGP4-V2-MIB'; $config['mibs'][$mib]['enable'] = 1; $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.6027.20.1'; $config['mibs'][$mib]['mib_dir'] = 'force10'; $config['mibs'][$mib]['descr'] = ''; And similar behaviour occurs there…. So whatever it dislikes, it only dislikes it when certain MIBs are being referenced? I can’t remember, but are these MIB files (or something MIB definition related) stored outside of SVN? Is it possible those are stale in our deployment? Cheers! [Custodian Data Centres]<https://www.custodiandc.com> Robert Williams Technical Director [Email] [email protected] [Call] +44 (0)1622 230382 (Opt. 1) [Follow us on Twitter]<https://twitter.com/custodiandc> [Like us on Facebook] <https://www.facebook.com/custodiandc> [Review us on Google] <https://goo.gl/trEs7h> [Connect with us on LinkedIn] [Subscribe to us on YouTube] [We have 5 stars us on Google] Registered Office: Vinters Business Park, New Cut Rd, Maidstone, Kent ME14 5NZ Company Number 07878023 Click here to view our email disclaimer<https://www.custodiandc.com/email-disclaimer> From: Adam Armstrong <[email protected]> Sent: 27 January 2023 12:44 To: Observium <[email protected]>; Robert Williams via observium <[email protected]> Cc: Robert Williams <[email protected]> Subject: Re: [Observium] Re: PHP Fatal after upgrade to 22.04 (php 8.1) this is line 105 in that file: [cid:[email protected]] It's not at all obvious what it's complaining about. Just a few lines before we do an almost identical thing: [cid:[email protected]] and countless times before that! My dev install is also the same PHP 8.1 package : root@dev:/opt/observium# php --version PHP 8.1.2-1ubuntu2.10 (cli) (built: Jan 16 2023 15:19:49) (NTS) Sticking to PHP7.4 is fine. I can't imagine an in-place update caused PHP to behave differently, so I'm not sure where to start diagnosing this behaviour. adam. Robert Williams via observium wrote on 27/01/2023 12:24: Hi! Currently showing these: # svn status M . ? config.php D C includes/definitions/os/tripplite.inc.php > local file unversioned, incoming file add upon update A + C includes/polling/os/cs121.inc.php > local file edit, incoming file delete or move upon update ? observium.log ? rrd Summary of conflicts: Tree conflicts: 2 The cs121 is something we changed ages ago, it’s probably no longer relevant. Tripplite I have no idea about to be honest, don’t recognise that one. Out of interest, I’ve dropped it back to php 7.4.33 – with no other changes - and it’s perfectly happy both at CLI and in Apache. Will sit on 7 for now then as it keeps it operational, but am happy to flip it 7<>8 in order to test anything suggested. Cheers! [Custodian Data Centres]<https://www.custodiandc.com/> Robert Williams Technical Director [Email] [email protected]<mailto:[email protected]> [Call] +44 (0)1622 230382 (Opt. 1) [Follow us on Twitter]<https://twitter.com/custodiandc> [Like us on Facebook]<https://www.facebook.com/custodiandc> [Review us on Google]<https://goo.gl/trEs7h> [Connect with us on LinkedIn] [Subscribe to us on YouTube] [We have 5 stars us on Google] Registered Office: Vinters Business Park, New Cut Rd, Maidstone, Kent ME14 5NZ Company Number 07878023 Click here to view our email disclaimer<https://www.custodiandc.com/email-disclaimer> From: Adam Armstrong via observium <[email protected]><mailto:[email protected]> Sent: 27 January 2023 12:01 To: Observium <[email protected]><mailto:[email protected]> Cc: Adam Armstrong <[email protected]><mailto:[email protected]> Subject: [Observium] Re: PHP Fatal after upgrade to 22.04 (php 8.1) How odd. I’ve not seen this before, you’d expect other PHP8 installs to hit it! Do you have any local modifications? (svn status) Adam. Sent from my iPhone On 27 Jan 2023, at 11:36, Robert Williams via observium <[email protected]<mailto:[email protected]>> wrote: Hi, Subscription edition, have just completed an upgrade of underlying Ubuntu to 22.04 from 18.04. Added all packages back to correct versions as per docs: apt install libapache2-mod-php8.1 php8.1-cli php8.1-mysql php8.1-gd php8.1-bcmath php8.1-mbstring \ php8.1-opcache php8.1-curl php-apcu php-pear snmp fping mysql-server mysql-client rrdtool subversion \ whois mtr-tiny ipmitool graphviz imagemagick apache2 python3-mysqldb python3-pymysql python-is-python3 PHP Version is as expected: PHP 8.1.2-1ubuntu2.10 (cli) (built: Jan 16 2023 15:19:49) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.2, Copyright (c) Zend Technologies However, both Apache and any manual CLI attempts throw this: # ./poller.php -h all PHP Fatal error: Uncaught Error: Cannot use a scalar value as an array in /opt/observium/includes/definitions/mibs/brocade.inc.php:105 Stack trace: #0 /opt/observium/includes/include-dir.inc.php(48): include() #1 /opt/observium/includes/definitions/mibs.inc.php(780): require('...') #2 /opt/observium/includes/definitions.inc.php(396): include('...') #3 /opt/observium/includes/sql-config.inc.php(55): require('...') #4 /opt/observium/poller.php(19): include('...') #5 {main} thrown in /opt/observium/includes/definitions/mibs/brocade.inc.php on line 105 Have tried setting as per docs: error_reporting = E_ALL & ~E_NOTICE Still throws it as ‘fatal’ and dies :( We are at revision 12495. Any ideas please? Assuming this is a side effect of an in-place upgrade on Ubuntu, rather than a reinstall/migrate, that’ll teach me… Cheers, [Custodian Data Centres]<https://www.custodiandc.com/> Robert Williams Technical Director [Email] [email protected]<mailto:[email protected]> [Call] +44 (0)1622 230382 (Opt. 1) [Follow us on Twitter]<https://twitter.com/custodiandc> [Like us on Facebook]<https://www.facebook.com/custodiandc> [Review us on Google]<https://goo.gl/trEs7h> [Connect with us on LinkedIn] [Subscribe to us on YouTube] [We have 5 stars us on Google] Registered Office: Vinters Business Park, New Cut Rd, Maidstone, Kent ME14 5NZ Company Number 07878023 Click here to view our email disclaimer<https://www.custodiandc.com/email-disclaimer> _______________________________________________ observium mailing list -- [email protected]<mailto:[email protected]> To unsubscribe send an email to [email protected]<mailto:[email protected]> _______________________________________________ observium mailing list -- [email protected]<mailto:[email protected]> To unsubscribe send an email to [email protected]<mailto:[email protected]> -- Sent from Postbox<https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach>
_______________________________________________ observium mailing list -- [email protected] To unsubscribe send an email to [email protected]
