How to install multi PHP versions

User avatar
myVesta
Site Admin
Posts: 958
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

Support for PHP 8.3 is just added.

Tags:
rain
Posts: 3
Joined: Fri Jan 12, 2024 10:27 am

Hello
using webmin for updating Debian 12 and getting this error.

Installing package(s) with command apt-get -y install php-mcrypt php8.2-mcrypt ..

The following packages have unmet dependencies:
php-mcrypt : Depends: php8.3-mcrypt but it is not installable
E: Unable to correct problems, you have held broken packages.

This is a new installation of myvestacp 2 days old, installed with multiple PHP versions of php 7.4, 8.1, 8.2, 8.3. Using this post..
viewtopic.php?f=18&t=52

Tried to update via webmin this morning.
I've seen around a few issues of this around.
Have rebooted Debian and tried to redo the updates but no success, the same msg.
Last edited by rain on Fri Jan 12, 2024 10:44 am, edited 2 times in total.
User avatar
myVesta
Site Admin
Posts: 958
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

Why are you using Webmin with Myvesta?
mcrypt is a deprecated module; I don't know why Webmin is trying to install it.
User avatar
debirose55
Posts: 1
Joined: Sun May 26, 2024 4:49 am

Will updating to a new PHP version affect existing web templates,download lagu or will it only add new features? Thank you.
User avatar
myVesta
Site Admin
Posts: 958
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

debirose55 wrote: Sun May 26, 2024 4:54 am Will updating to a new PHP version affect existing web templates,download lagu or will it only add new features? Thank you.
It will NOT affect existing templates and PHP versions; it will only add new ones.
brain8torm
Posts: 3
Joined: Thu Jul 25, 2024 12:32 pm

Hi! I installed myVesta for the first time on VDS c Debian 12.6. I try to install Multi PHP and get such errors. I'm attaching a screenshot. How to solve this problem?
Attachments
screenshot-20240725-001.png
screenshot-20240725-001.png (188.84 KiB)
User avatar
myVesta
Site Admin
Posts: 958
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

brain8torm wrote: Thu Jul 25, 2024 12:45 pm Hi! I installed myVesta for the first time on VDS c Debian 12.6. I try to install Multi PHP and get such errors. I'm attaching a screenshot. How to solve this problem?
I just checked, and everything went fine.
Run apt update and paste output here; maybe you have an old sury signing key.
brain8torm
Posts: 3
Joined: Thu Jul 25, 2024 12:32 pm

When trying to run apt update, it returns an error

Code: Select all

Hit:1 http://mirror.hoztnode.net/debian-security bookworm-security InRelease
Hit:2 http://mirror.hoztnode.net/debian bookworm-updates InRelease
Hit:3 http://mirror.hoztnode.net/debian bookworm InRelease
Err:4 https://packages.sury.org/php bookworm InRelease    
  451   [IP: 93.189.63.149 443]
Hit:5 https://nginx.org/packages/mainline/debian bookworm InRelease
Hit:6 https://apt.myvestacp.com/bookworm bookworm InRelease
Reading package lists... Done
E: Failed to fetch https://packages.sury.org/php/dists/bookworm/InRelease  451   [IP: 93.189.63.149 443]
E: The repository 'https://packages.sury.org/php bookworm InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
brain8torm
Posts: 3
Joined: Thu Jul 25, 2024 12:32 pm

It seems the problem has been solved. Yes, indeed, at first it was clear that the error was in outdated keys. But in the end, the problem is that when I tried to go to the server URL with the update, I found that they were unavailable from my location. Therefore, I fixed this error by configuring a proxy for apt.
The apt update command was executed successfully and the Multi PHP installation was completed without errors. Thanks!
Komisar
Posts: 5
Joined: Sun Oct 22, 2023 3:29 pm

Any ideas how to avoid installation of unnecessary latest PHP version binaries? :?: :?: :?:
  1. Steps to reproduce
  2. Download multi-php-install.sh
  3. Set e.g. inst_74=1; inst_80=1; all other versions are set to 0.
  4. Run
Expected:
Installed 7.4 and 8.0 binaries, modules and myVesta templates.

Real situation:
  • Installed 7.4 and 8.0 binaries, modules and myVesta templates, as expected
  • Installed unnecessary 8.3 latest available binaries without corresponding myVesta template.
  • Trying to uninstall 8.3 manually leads to removal of phpMyadmin and some other necessary software.
Probably at some systems same problem will be hit with installed 8.4 binaries

OS: Debian 12.
Official repo contains PHP 8.2 as the latest version.

Maybe this is related to
The following packages will be upgraded:
php-common
(even if removed apt upgrade -y from the script and added --no-upgrade everywhere)


P.S. some files need to be updated
/usr/local/vesta/data/templates/web/apache2/PHP-FPM-*.sh
PHP-FPM-83.sh contains lines for 5.6 - 8.3
PHP-FPM-82.sh contains lines for 5.6 - 8.2
PHP-FPM-74.sh contains lines for 5.6 - 8.0
PHP-FPM-56.sh contains lines for 5.6 - 8.0
IMHO all files must contain lines for 5.6 - 8.4 (actually latest version supported by vesta-inst-php.sh) to avoid a condition when 2 FPMs will consume resources for hosting the same website simultaneously after few changes of template.
Post Reply