YunoHost-Apps / my_webapp_ynh

Custom Web app with SFTP access
GNU General Public License v3.0
47 stars 39 forks source link

When changing PHP version, all dependencies are not reinstalled #131

Open fflorent opened 8 months ago

fflorent commented 8 months ago

Describe the bug

When changing PHP version through config panel, all dependencies are not reinstalled. For example, if we asked a mysql DB + PHP 8.0 during installation, when switching PHP version 8.2, php8.2-mysql is not installed.

Context

Steps to reproduce

ii php8.0 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 all server-side, HTML-embedded scripting language (metapackage) ii php8.0-cli 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 command-line interpreter for the PHP scripting language ii php8.0-common 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 documentation, examples and common module for PHP ii php8.0-fpm 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php8.0-mysql 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 MySQL module for PHP ii php8.0-opcache 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 Zend OpCache module for PHP ii php8.0-readline 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 readline module for PHP

Expected behavior

php8.2-mysql should have been installed.

Logs

When an operation fails, YunoHost provides a simple way to share the logs.

After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)

If applicable and useful, add screenshots to help explain your problem.

fnwbr commented 2 months ago

I see that a Pull Request was merged after the issue was created. Thank you for that, @fflorent!

Should this issue be marked as resolved now?

CodeShakingSheep commented 3 weeks ago

I also encountered a strange behavior regarding PHP versions. When PHP was upgraded to version 8.0 I have this content in /etc/php/8.0/fpm/pool.d/my_webapp.conf. So, it seems that it still listens to php7.4-fpm-my_webapp.sock.

[my_webapp]

user = my_webapp
group = my_webapp

chdir = /var/www/my_webapp

listen = /var/run/php/php7.4-fpm-my_webapp.sock
listen.owner = www-data
listen.group = www-data

@fflorent Is this related to your issue / PR or does this require another fix?