Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fflorent opened this issue Oct 15, 2023 · 2 comments
Open

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

fflorent opened this issue Oct 15, 2023 · 2 comments

Comments

@fflorent
Copy link
Contributor

fflorent commented Oct 15, 2023

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

  • Hardware: N/A
  • YunoHost version: 11.2.4+202309072145
  • I have access to my server: Through SSH
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
  • Using, or trying to install package version/branch: I am using this branch:
  • If upgrading, current package version: can be found in the admin, or with yunohost app info $app_id

Steps to reproduce

  • yunohost app intall my_webapp
    • phpversion=8.0
    • database=mysql
  • dpkg -l | grep php8.0 gives you this:

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

  • Change phpversion to 8.2 through commandline or admin panel
  • dpkg -l | grep php8.2 does not list php8.2-mysql.

Expected behavior

php8.2-mysql should have been installed.

Logs

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

  • In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.
  • In command line, the command to share the logs is displayed at the end of the operation and looks like yunohost log display [log name] --share. If you missed it, you can find the log ID of a previous operation using yunohost log list.

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
Copy link

fnwbr commented Apr 24, 2024

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
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants