PHP-FPM and PHP CLI version mismatch cause socialite error

Server: Ubuntu 24.04.2
PHP Version 8.3.20
nginx version: nginx/1.28.0

-Try to Bring up the login page.

librenms.log shows

[2025-04-29T23:38:12][ERROR] Missing required parameter for [Route: socialite.redirect] [URI: auth/{provider}/redirect] [Missing parameter: provider]. {"view":{"view":"/var/opt/librenms/resources/views/auth/login-form.blade.php","data":[]},"exception":"[object] (Spatie\\LaravelIgnition\\Exceptions\\ViewException(code: 0): Missing required parameter for [Route: socialite.redirect] [URI: auth/{provider}/redirect] [Missing parameter: provider]. at /var/opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php:35)
[previous exception] [object] (Illuminate\\Routing\\Exceptions\\UrlGenerationException(code: 0): Missing required parameter for [Route: socialite.redirect] [URI: auth/{provider}/redirect] [Missing parameter: provider]. at /var/opt/librenms/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php:35)"} 

Tried to reset the auth.socialite config with no luck

librenms@librenms:~/config$ lnms config:get auth.socialite
{
    "redirect": false,
    "register": true,
    "default_role": "none",
    "claims": [],
    "configs": {
        "": []
    }
}
librenms@librenms:~/config$ lnms config:set auth.socialite.configs

 Reset auth.socialite.configs to the default? (yes/no) [no]:
 > yes

librenms@librenms:~/config$ lnms config:get auth.socialite
{
    "redirect": false,
    "register": true,
    "default_role": "none",
    "claims": [],
    "configs": {
        "": []
    }
}

Validate showed… One clue here was the timezone issue

librenms@librenms:~/config$ /opt/librenms/validate.php 
===========================================
Component | Version
--------- | -------
LibreNMS  | 25.4.0-58-g41987a816 (2025-04-30T04:07:41+00:00)
DB Schema | 2025_04_15_122034_laravel_11_fix_types (332)
PHP       | 8.4.6
Python    | 3.12.3
Database  | MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2
RRDTool   | 1.7.2
SNMP      | 5.9.4.pre2
===========================================

[OK]    Composer Version: 2.8.8
[OK]    Dependencies up-to-date.
[OK]    Database Connected
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[FAIL]  Time between this server and the mysql database is off
 Mysql time 2025-04-30 00:37:13
 PHP time 2025-04-30 05:37:13
[FAIL]  You have a different system timezone (CDT) than the php configured timezone (UTC)
        [FIX]: 
        Please correct either your system timezone or your timezone set in /etc/php/8.4/cli/php.ini.
[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

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:
No

If you need to post any text longer than a few lines, please use a pastebin service such as https://p.libren.ms using non-expiring pastes.

I hope this helps someone else. Took a bit to figure this out.

PHP cli was running php 8.4.6
Nginx was using php8.3-fpm (Specifically) 8.3.20

Some how when we upgrade the Ubnutu server from Ubuntu 20.04 → 24.04 and upgrade php8.0 to 8.4 we created the version mismatch. Only today did this show up as an error after running like this for 2 months or so.

Created the following file to determine the php version running on the web
file: var/opt/librenms/html/phpinfo.php

<?php phpinfo();

Open a browser to http://yourserver/phpinfo.php and see what version it returns. Delete this file after your done using it. validate.php will fail and the daily.sh script will not run.

Follow the Configure PHP-FPM and Configure Web Server from the installation guide to fix this.

We decided that we are going to run php8.4
Create and edit: /etc/php/8.4/fpm/pool.d/librenms.conf

[librenms]
user = librenms
group = librenms
listen = /run/php-fpm-librenms.sock      <<<< Must Match nginx site config
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

Set the timezones in
Edit: /etc/php/8.4/fpm/php.ini
Edit: /etc/php/8.4/cli/php.ini

Edit line in etc/nginx/conf.d/librenms.conf

fastcgi_pass unix:/run/php-fpm-librenms.sock;   <<<< Must Match php8.4 config

Disable all the other php versions running and only run php8.4
#systemctl disable php8.2-fpm
#systemctl disable php8.3-fpm
#systemctl stop php8.2-fpm
#systemctl stop php8.3-fpm
#systemctl enable php8.4-fpm
#systemctl start php8.4-fpm

Fixed