Validate ok but composer error on webinterface

Hi,

I updated my librenms install from php7.4 to php 8.1 on centos 7.After resolving all issues reported by validate.php now everything is clean but on the webinterface i have the following error

“Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”. Your Composer dependencies require the following PHP extensions to be installed: gd.”

output of .validate.php is below

-bash-4.2$ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 22.11.0-19-gc4cb9c6 (2022-12-09T18:28:29+02:00)
DB Schema | 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table (248)
PHP       | 8.1.13
Python    | 3.6.8
Database  | MariaDB 10.5.18-MariaDB
RRDTool   | 1.4.8
SNMP      | 5.7.2
===========================================

[OK]    Composer Version: 2.4.4
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]
[OK]    Database schema correct
[OK]    MySQl and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[WARN]  IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK]    rrd_dir is writable
[OK]    rrdtool version ok
-bash-4.2$

output of daily.sh and git pull si below

-bash-4.2$ git pull && ./daily.sh
Already up-to-date.
Updating to latest codebase                        OK
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK
Caching Mac OUI data                               OK
-bash-4.2$

Can anybody help please?

Thanks !

I know it will sounds dumb but … have you installed the gd php extension?
It’s php-gd iirc

Hi, thanks for the idea, php-gd is already installed and loaded

Any other idea is highly appreciated. Thanks !

There are many things you can do :

sudo a2dismod php7.4
sudo a2enmod php8.1
sudo service apache2 restart

This could help or try redo composer

composer global update

some links that could help you :
https://stackoverflow.com/questions/65339404/composer-detected-issues-in-your-platform-your-composer-dependencies-require-a

https://namespaceit.com/blog/composer-detected-issues-in-your-platform-your-composer-dependencies-require-a-php-version

https://stackoverflow.com/questions/72846653/your-composer-dependencies-require-a-php-version-8-1-0

hi, thank you very much for the reply it gave me the necessary “BLING” to solve the issue.
So indeed as you pointed the issue was with the php module, even if i completely uninstalled php 7 somehow the module was still present. It was strange that php -v reported that is was using php.8.1. As it looks in php8.1 on centos 7 best is to disable module php completely and use php-fpm
The commands that you sent do not work in centos, i guess they are for debin/ubuntu

to resolve the issue i did the following

  1. comment out the module php from the apache config
  2. enable php.fpm an create librenms.conf in the /etc/php.fpm.d
cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/librenms.conf
vi /etc/php-fpm.d/librenms.conf

Change [www] to [librenms]:


[librenms]
Change user and group to "librenms":


user = librenms
group = librenms
Change listen to a unique name:


listen = /run/php-fpm-librenms.sock
  1. create the .socket because it was not auto carated
touch /run/php-fpm-librenms.sock
  1. restart php-fpm and httpd
service httpd restart && service php-fpm restart
  1. done

Thanks again !

1 Like

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