Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0

If you get this message in the webui, that means your web server is not running php 8.2.0 or greater. It is still running an older version of php-fpm or similar. How you update that depends on your install. One common approach is to fully uninstall old php versions. Feel free to comment with specifics for an os/setup below.

1 Like

In our case, even though we had 8.3.6 installed, the error was appearing because 8.1 was still installed. Here are the steps that worked for us:
On the server CLI, ran:
sudo apt remove php8.1-*

Even though the daily and validate scripts showed all “OK”, at this point the web UI showed a 502 Bad Gateway error.

image

Restarting the server (sudo reboot) solved that issue, but the web UI then showed a different error, stating “Whoops, the web server could not write required files to the filesystem.” The error message included commands to run in the CLI to fix the issues.

After running those commands, the web UI was back up and running.

1 Like

This is a nightmare. I having this problem from monday. I tried many things to solve it. Yesterday I replicated whole VM from backup, but today after daily script librenms updated and there is same problem: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.2.0”.
Can someone please solve the problem. I deleted old PHP versions, set timezones in php8.3, solve any issues in validate. Now everything is OK, green but web part of librenms is not working. Im not primary linux admin, so my knowledge is limited. :frowning:

I had the same issue as above with the recent upgrade. My system is running Debian 12 with NGinx 1.22, PHP-FPM8.1, and LibreNMS, and it was just auto-upgraded to 25.1.0-65-gfff260f26. Here is what I had to do to fix this:

  • As indicated above, apt-purge nginx8.1
  • Copy the /etc/php/8.1/fpm/pool.d/librenms.conf to /etc/php/8.2/fpm/pool.d/librenms.conf
  • Edit the /etc/php/8.2/fpm/pool.d/librenms.conf file and make sure the contents are valid (eg: correct user/group, port numbers, etc)
  • Make sure the listen line in the /etc/php/8.2/fpm/pool.d/librenms.conf file matches the fastcgi_pass line in your nginx config file (mine is named /etc/nginx/sites-enabled/librenms.vhost). On my server:
    • /etc/php/8.2/fpm/pool.d/librenms.conf had this: listen = /run/php/php-fpm-librenms.sock
    • /etc/nginx/sites-enabled/librenms.vhost had this: fastcgi_pass unix:/run/php/php-fpm-librenms.sock'
  • Reboot

Hope this helps someone…

1 Like

We are also facing same issues tried all above steps but didn’t work for us …

Same issue here on Ubuntu. I’m an idiot and rm- r’d the 8.1 folder after uninstalling without checking for a special librenms.conf file.

My fix was:

sudo apt remove php8.1-*
sudo rm -r /etc/php/8.1
edit /etc/php/8.2/fpm/pool.d/www.conf

  • user = librenms
  • group = librenms
  • listen = /run/php-fpm-librenms.sock

Restart services

I also had the following in my /var/log/nginx/error.log:

*1 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream

Thanks for everyone in this post for pointing me in the right direction.

Hello. I am currently experiencing this same exact issue after the last update a few days ago. Server is running RHEL7.9 and reports current PHP version as 8.3.8 but composer thinks otherwise and I really need to get the website back online. Alerting is still working and sending emails but the webpage only gives the message “Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.2.0”.”

Any guidance will be greatly appreciated

As above, it’s probably your php-fpm setup still referring to the older version - though I’m not sure how RHEL manages the versions.

Have you definitely got php82-php-fpm or php83-php-fpm installed and removed anything older? rpm -qa | grep fpm or something like that?

I’ve not come across many RHEL/centos users, so don’t know how accurate the doco is around versioning.

I’d suggest running through the install doco for php-fpm closely again: Installing LibreNMS - LibreNMS Docs

librenms]# rpm -qa | grep fpm
rh-php73-php-fpm-7.3.33-1.el7.x86_64
php81-php-fpm-8.1.29-1.el7.remi.x86_64
php-fpm-8.3.8-1.el7.remi.x86_64

@rhinoau
I just uninstalled the old versions after running the query that you suggested and now getting a different error:

That makes sense - the web server has had the fpm carpet ripped out from under it.
Double check the php-fpm settings as per the install doco, and restart your new fpm process and web server.

[Wed Feb 26 19:18:33.710222 2025] [proxy:error] [pid 2245:tid 140712565786368] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /r un/php-fpm-librenms.sock (*) failed
[Wed Feb 26 19:18:33.710241 2025] [proxy_fcgi:error] [pid 2245:tid 140712565786368] [client 10.254.30.116:44361] AH01079: failed to make connection to backend: httpd-U DS

If that is genuinely the verbatim error - you have an erroneous space in your /run/ socket name

must’ve been the copy and paste which put that space; still getting same error in the httpd error logs:

[Wed Feb 26 19:45:23.311374 2025] [proxy:error] [pid 30776:tid 139877488260864] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm-librenms.sock (*) failed
[Wed Feb 26 19:45:23.311412 2025] [proxy_fcgi:error] [pid 30776:tid 139877488260864] [client 10.254.30.116:45853] AH01079: failed to make connection to backend: httpd-UDS

[root@ php-fpm.d]# more /etc/httpd/conf.d/librenms.conf
<VirtualHost *:80>
DocumentRoot /nms/librenms/html/
ServerName librenms

AllowEncodedSlashes NoDecode
<Directory “/nms/librenms/html/”>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews

Enable http authorization headers

SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1

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

[root@ php-fpm.d]# more www.conf
; Start a new pool named ‘www’.
[www]

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; ‘ip.add.re.ss:port’ - to listen on a TCP socket to a specific address on
; a specific port;
; ‘port’ - to listen on a TCP socket to all addresses on a
; specific port;
; ‘/path/to/unix/socket’ - to listen on a unix socket.
; Note: This value is mandatory.
listen = /run/php-fpm/php-fpm-librenms.sock
;listen = 127.0.0.1:9000

; Set listen(2) backlog. A value of ‘-1’ means unlimited.
; Default Value: -1
;listen.backlog = -1

1 Like

found the mistake in the path to the sock file but still gettting nowhere

[Wed Feb 26 19:57:55.894827 2025] [proxy:error] [pid 6685:tid 140250263897856] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/php-fpm-librenms.sock (*) failed
[Wed Feb 26 19:57:55.894854 2025] [proxy_fcgi:error] [pid 6685:tid 140250263897856] [client 10.254.30.116:46377] AH01079: failed to make connection to backend: httpd-UDS

php-fpm]# ls -l
total 4
srw-rw---- 1 www www 0 Feb 26 19:31 php-fpm-librenms.sock
-rw-r–r-- 1 root root 4 Feb 26 19:30 php-fpm.pid

This was solved in private messages.

There were multiple versions of php-fpm installed as shown, but RHEL doesn’t refer to individual versions in its fpm setup like other distros do.

Removing the old versions and then following the install doco exactly solved it - the subsequent errors were from config not matching the install doco for socket and user/group permissions (www versus librenms)

1 Like