Yunohost and php8.0 are on a boat

English version

Hi all,

PHP version 8 has introduced major improvements in terms of performances.

Debian Buster used by Yunohost looks to have php8.0 package available.

Does anyone has tried to install this version of PHP and configure Yunohost to use it? If yes, has there been any issue with it?

Thansk for info.

Version française

Bonjour à tous,

La version 8 de PHP a apporté des améliorations de performances notables.

Debian Buster utilisée par Yunohost semble bien avoir un paquet php8.0 disponible.

Est-ce que quelqu’un a déjà tenté d’installer cette version de PHP et de configurer Yunohost pour l’utiliser ? Si oui, des soucis ont-ils été rencontrés ?

I think you have a slight misconception on how YunoHost handles PHP. There is not one unique PHP version installable at a time on Debian. Since it is not the default PHP version shipped with Debian 10, YunoHost can install PHP8.0 if an app requires it. It will not install it if none needs it.

Note that PHP8.0 introduced some breaking changes from earlier versions, so forcing it upon apps may break them.

So is it possible to experiment (on a non-production system) and force an app to use a different version of PHP? It could be fun and a way to help test what apps would benefit/break…

Sure, you can refer to the packaging documentation, notably the ynh_add_fpm_config helper and the YNH_PHP_VERSION variable to be put in scripts/_common.sh. It takes care of installing the required PHP version if needed.

Simply read the “upstream” documentation (“requirement”, “installation” or “dependencies” chapters) of these apps could be a good idea to know if php8 is supported or not.

If the end goal is to improve reactivity of your app, i suggest you before to optimize the php-fpm conf regarding your number of core and ram.

Specifically those params:

pm =
pm.max_children = 
pm.max_requests = 
pm.start_servers = 
pm.min_spare_servers = 
pm.max_spare_servers =
1 Like

Hello, thanks for this very interesting discussion :slight_smile:

I’m about to install Yunohost, and in my current experience (Debian 10, no Yunohost yet), I installed PHP8 and forced wallabag (which is not compatible yet) to use a previous version of PHP, with success. But I didn’t manage to make it work with Dokuwiki though (see Run an older PHP version before PHP8 is compatible - DokuWiki User Forum). I’m on Apache though, so maybe it works better on Nginx. (but if anybody has a hint, I’d be happy to receive it :wink: )

@ljf Is there something done by Yunohost automatically to optimise the php-fpm parameters? I’m interested to have your advice, because I understood, notably for Nextcloud, that it could dramatically increase the reactivity. I read Server tuning — Nextcloud latest Administration Manual latest documentation which advises a website to calculate the optimal configuration (PHP-FPM Process Caluculator), but I’d be interested to receive your advice / policy on this matter. I have tried on my side, to modify /etc/php/8.0/fpm/php-fpm.conf but without clear impact on the performance yet (for example on the required time to load the web UI of Nextcloud).

Thanks in advance!

@biva a lot of current yunohost php app use php7.3. I think probably some apps use PHP8.
PHP version is managed by the app package, not trying to change the version is the recommended way if you have no strong skills in yunohost app packaging.

Previouly, we had some hidden features to optimize PHP to support several hundred of simultaneous user. However, we rewrote config panel mechanism in the recent 4.3 version, so those hidden features should be adapted with this new mechanism.

Nextcloud reactivity depends on several factors:

  • the php configuration (number of worker, number of request per worker, ram allocated…). This config should be equilibrate regarding the ram available and the number of cpu thread. It’s not needed to increase ram or cpu if you doesn’t equilibrate the php configuration file.
  • IO performance (for software pieces, database and for data). On my side, i use SSD for software and database parts and HDD for data
  • network performance

By default, nextcloud on a simple yunohost setup works for about 15 simultaneous users. After that you need the lost hidden feature (or reproduces the change it made directly in the php config)

1 Like

Thanks a lot @ljf !

Je comprends que tu parles français, je continue donc en français :slight_smile:

Bien compris pour la gestion de la version PHP : je ne vais pas m’amuser à la changer pour éviter de tout casser.

Est-ce que je peux te demander comment fonctionnent ces “hidden features” et le nouveau mécanisme dans 4.3 ? Comment adapter ces fonctionnalités cachées au nouveau mécanisme ? Est-ce qu’il y a de la doc à ce sujet ?

Nous avons aujourd’hui 20 utilisateurs, mais allons passer à une cinquantaine. Notre hardware est suffisament musclé (8 Go RAM, AMD Ryzen3 4300GE) et il serait dommage de ne pas en profiter à cause d’une mauvaise config PHP :wink:

D’avance merci !