Validate page broken

A recent update has appeared to have broke my validate page.

validate

Output of validate.php

$ $ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 22.3.0-50-g9c126572a
DB Schema | 2022_04_08_085504_isis_adjacencies_table_add_index (236)
PHP       | 7.4.13
Python    | 3.8.10
MySQL     | 10.3.34-MariaDB-0ubuntu0.20.04.1
RRDTool   | 1.7.2
SNMP      | 5.8
====================================

[OK]    Composer Version: 2.3.5
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
$

librenms log has this when running a tail during looking at /validate

2022-04-17T12:27:29.677391-04:00] production.ERROR: Undefined offset: 1 {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined offset: 1 at /opt/librenms/LibreNMS/Util/Version.php:70)"}

I’ve exactly the same problem.

Error LibreNMS validate.php

Anyone have a solution ?

Im pretty sure it’s because you dont run the php process as the librenms user, described in the docs here;

(tho it shouldn’t ofc crash due to that)

Thanks for the reply. I haven’t looked at the documentation in some time and I did indeed have to update my php-fpm configuration as it must have gotten nuked when upgrading to Ubuntu 20.04 LTS from 18.04 a year or so ago.

However, that did not fully resolve my issue. The main thing I was missing was the following configuration in my Apache conf file:

  # Enable http authorization headers
  <IfModule setenvif_module>
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
  </IfModule>

  <FilesMatch ".+\.php$">
    SetHandler "proxy:unix:/run/php-fpm-librenms.sock|fcgi://localhost"
  </FilesMatch>

Also had to update my php.ini file for date and time in /etc/php/7.4/fpm

Now everything is validated and ok via web UI. Hope this helps someone in the future

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.