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…

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.