My YunoHost server
Hardware: VPS bought online
YunoHost version: 11.2.10.3 (stable)
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I have a small problem with the php versions. Among other things, I use the “Hubzilla” app and have another Hubzilla installation as a custom webapp (because the YH package is only updated very late). Hubzilla has a directory called “util”, which contains various scripts for different functions (e.g. updating, listing add-ons or creating documentation etc.). There are also php scripts there. These start with the shebang #!/usr/bin/env php . And this is where the problem is. Hubzilla requires php >= 8.1.0. php8.2 is installed and I have also selected php version 8.2 when creating the custom webapp. So far everything works very well. In the .htconfig.php of Hubzilla I have correctly entered /usr/bin/php8.2 for php_path and in the cronjob I also use /usr/bin/php8.2 directly. So far the system is working. Only the php util scripts do not work, because /usr/bin/env php uses the version that is linked in /etc/alternatives (that is correct, isn’t it?). And there php refers to /usr/bin/php7.4. This causes the scripts to abort with an error message because Hubzilla requires php8.1 or 8.2.
Otherwise, in /etc/alternatives phar links to /usr/bin/phar8.2 and php-fpm.sock links to /run/php/php8.2-fpm.sock. Only php refers, as mentioned, to /usr/bin/php7.4 (and the man page php.1.gz to /usr/share/man1/php7.4.1.gz … but I didn’t care;-) ).
Question: Can I simply change the php reference in /etc/alternatives to /usr/bin/php8.2? Or is there something against it?
php7.4 is otherwise not used on my VPS:
# lsof | grep /var/run/php | awk '{print $9}' | sort -u | cut -d'/' -f5 | awk -F'-' '{print $1,$3}' | cut -d'.' -f1,2
php8.2 hubzilla
php8.2 my_webapp
php8.2 streams
Mon serveur YunoHost
Matériel: VPS acheté en ligne
Version de YunoHost: 11.2.10.3 (stable)
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modifications particulières sur votre instance ? : non
Description du problème
J’ai un petit problème avec les versions php. J’utilise entre autres l’application “Hubzilla” et j’ai une autre installation de Hubzilla en tant que Custom Webapp (parce que le paquet YH n’est mis à jour que très tard). Chez Hubzilla, il y a le répertoire “util”, dans lequel se trouvent différents scripts pour différentes fonctions (par ex. mise à jour, liste des addons ou création de la documentation, etc.) On y trouve également des scripts php. Ceux-ci démarrent avec le shebang #!/usr/bin/env php . Et c’est là que se situe le problème. Hubzilla requiert php >= 8.1.0. php8.2 est installé et j’ai également sélectionné php dans la version 8.2 lors de la création de la Custom Webapp. Jusqu’à présent, tout fonctionne très bien. Dans le fichier .htconfig.php de Hubzilla, j’ai correctement saisi /usr/bin/php8.2 dans php_path et dans le cronjob, j’utilise également directement /usr/bin/php8.2. Jusque-là, le système fonctionne. Seuls les scripts php util ne fonctionnent pas, car /usr/bin/env php utilise la version liée à /etc/alternatives (c’est correct, non ?). Et là, php fait référence à /usr/bin/php7.4, ce qui fait que les scripts s’arrêtent avec un message d’erreur parce que Hubzilla nécessite php8.1 ou 8.2.
Sinon, dans /etc/alternatives, phar pointe vers /usr/bin/phar8.2 et php-fpm.sock vers /run/php/php8.2-fpm.sock. Seul php, comme mentionné, fait référence à /usr/bin/php7.4 (et la page de manuel php.1.gz à /usr/share/man1/php7.4.1.gz … mais je m’en fiche ).
Question : puis-je simplement changer la référence php dans /etc/alternatives pour /usr/bin/php8.2 ? Ou y a-t-il des raisons de ne pas le faire ?
php7.4 n’est pas utilisé par ailleurs sur mon VPS :
# lsof | grep /var/run/php | awk '{print $9}' | sort -u | cut -d'/' -f5 | awk -F'-' '{print $1,$3}' | cut -d'.' -f1,2
php8.2 hubzilla
php8.2 my_webapp
php8.2 streams