PHP 8.3 issues after update on Raspian server

So the other day I ran a full update on Raspian running Librenms, and now I’m running into this message when I visit the before working Librenms page:

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0".
And so far I have only tried to run ./daily.sh to hopefully remedy this, but that did not help.
php -v

PHP 8.3.2-1+0~20240120.16+debian11~1.gbpb43448 (cli) (built: Jan 20 2024 14:17:59) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.2, Copyright (c) Zend Technologies
with Zend OPcache v8.3.2-1+0~20240120.16+debian11~1.gbpb43448, Copyright (c), by Zend Technologies

./scripts/composer_wrapper.php install --no-dev

LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package influxdb/influxdb-php is abandoned, you should avoid using it. No replacement was suggested.
Package nunomaduro/larastan is abandoned, you should avoid using it. Use larastan/larastan instead.
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

   INFO  Discovering packages.  

  laravel-notification-channels/webpush ................................. DONE
  laravel/socialite ..................................................... DONE
  laravel/tinker ........................................................ DONE
  laravel/ui ............................................................ DONE
  librenms/laravel-vue-i18n-generator ................................... DONE
  mews/purifier ......................................................... DONE
  nesbot/carbon ......................................................... DONE
  nunomaduro/termwind ................................................... DONE
  php-flasher/flasher-laravel ........................................... DONE
  silber/bouncer ........................................................ DONE
  spatie/laravel-ignition ............................................... DONE
  tightenco/ziggy ....................................................... DONE

75 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
LibreNMS\ComposerHelper::postInstall
Illuminate\Foundation\ComposerScripts::postInstall
@php artisan vue-i18n:generate --multi-locales --format=umd
@php artisan view:cache

   INFO  Blade templates cached successfully.  

@php artisan optimize

   INFO  Caching the framework bootstrap files.  

  config ........................................................... 88ms DONE
  routes .......................................................... 231ms DONE

@php artisan config:clear

   INFO  Configuration cache cleared successfully.  

scripts/dynamic_check_requirements.py || pip3 install --user -r requirements.txt || :

So what can I do to fix this issue?

Tried downgrading PHP? I’m running 8.2.14 which is working fine due to a similar issue with the latest version of PHP.

Yeah, I could probably try that of course. But I fear that I will wreck everything.

This would be related i’d say, which will be released in the next patch regarding 8.3

and this

ah, thats great news then! So then I just wait for the release.

Thanks a lot!

I’m already running php 8.3.1 with no errors

I had to change some php config from php 8.2 to make 8.3 work.

PHP 8.1.0 and above is supported.

Care to share what config you did alter?

I went through the setup

Checking for any references to php 8.2 and changed them to 8.3.

I think it was only the php and webserver config that changed.

I’m the stupid one, I updated to the 24.2.0 with php 8.3 support, and I still get:

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

What is version 24.2.0?

Did you check these files?

/etc/php/8.2/fpm/pool.d/librenms.conf
/etc/php/8.2/fpm/php.ini
/etc/php/8.2/cli/php.ini

They should all be in /etc/php/8.3

Once reconfigured

systemctl reload nginx (or your web server)
systemctl restart php8.3-fpm

Yeah, I did all that and even rebooted the rpi to be sure.

===========================================
Component | Version
--------- | -------
LibreNMS  | 24.2.0 (2024-02-27T19:54:10+01:00)
DB Schema | 2024_02_07_151845_custom_map_additions (290)
PHP       | 8.3.2-1+0~20240120.16+debian11~1.gbpb43448
Python    | 3.9.2
Database  | MariaDB 10.5.23-MariaDB-0+deb11u1
RRDTool   | 1.7.2
SNMP      | 5.9
===========================================

[OK]    Composer Version: 2.7.1
[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]    Database and column collations are correct
[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
[OK]    rrd_dir is writable
[OK]    rrdtool version ok

And this is whats showing up in the error logs.

[client 192.168.2.18:63981] PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 8.1.0”. You are running 7.4.33. in /opt/librenms/vendor/composer/platform_check.php on line 47

So I’m somehow running php7.4 then? :laughing:

NOTICE: Not enabling PHP 8.3 FPM by default.
NOTICE: To enable PHP 8.3 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php8.3-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
pi@librenms:/usr/share/keyrings $ sudo a2enconf php8.3-fpm
Enabling conf php8.3-fpm.
To activate the new configuration, you need to run:
  systemctl reload apache2
pi@librenms:/usr/share/keyrings $ sudo systemctl reload apache2

And all the sudden everything is working! How about that! :smiley:

1 Like

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