Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1004350: php-common: Conflict with php7.4

351 views
Skip to first unread message

Stefano Callegari

unread,
Jan 25, 2022, 11:00:04 AM1/25/22
to
Package: php-common
Version: 2:92
Severity: normal

Dear Maintainer,

while in Sid php7.4 is still maintained

~ <bash> $ apt search php7.4-fpm
Ordinamento... Fatto
Ricerca sul testo... Fatto
php7.4-cgi/unstable,now 7.4.26-1 amd64 [installato]
linguaggio di scripting incorporato nell'HTML, lato server (binario CGI)

php7.4-fpm/unstable,now 7.4.26-1 amd64 [installato]
linguaggio di scripting incorporato nell'HTML, lato server (binario FPM-CGI)

it's impossible to install because php-common 2:92 requires only php8.1 and
conflicts with php7.4

The only way (suggested by aptitude) to have both php 8.1 and 7.4 is
downgrade it to 2:76 from Stable.

Why php7.4? Simply, some web applications like Wordpress aren't ready for php8.1.

Please, is it possible to unlock php7.4 in php-common from Sid?

Thanks

Stefano


-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (903, 'unstable'), (500, 'testing'), (400, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-3-amd64 (SMP w/4 CPU threads)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:it
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages php-common depends on:
ii psmisc 23.4-2
ii sed 4.8-1

php-common recommends no packages.

php-common suggests no packages.

-- no debconf information

Ondřej Surý

unread,
Jan 25, 2022, 11:10:04 AM1/25/22
to
Control: close -1

No, php7.4 will be removed from unstable in couple of days.

You should not be using unstable or testing and expect that thing will never change.

--
Ondřej Surý <ond...@sury.org> (He/Him)

> On 25. 1. 2022, at 16:51, Stefano Callegari <ste.ca...@tiscali.it> wrote:
>
> Package: php-common

Stefano Callegari

unread,
Jan 25, 2022, 7:30:04 PM1/25/22
to
Il Tue, Jan 25, 2022 at 04:56:40PM +0100, Ondřej Surý scrisse:
> Control: close -1
>
> No, php7.4 will be removed from unstable in couple of days.
>
> You should not be using unstable or testing and expect that thing will never change.

Ok, thanks.

I'll use preferences.
--
Stefano Callegari
GnuPG Public Key Server: pgp.mit.edu
signature.asc

Timo van Roermund

unread,
Jan 30, 2022, 8:10:04 AM1/30/22
to
Hi Ondřej,

First of all, thanks for maintaining the PHP packages. Much appreciated.

I understand from this thread, as well as bug #1004350) that it's
intentional that only one version of PHP can be installed on Debian.

Nonetheless, I had to find a way to run PHP 7.4 next to PHP 8.1, as two
web applications I frequently use (Horde and phpLDAPadmin) are not yet
compatible with PHP 8.x.

Below a summary of what I did, as this may be useful for others having
similar issues as well:
1. manually modify the dependencies of php-common to allow PHP 7.4 to be
installed
2. install PHP 7.4 and configure Apache to use PHP 7.4 for these two web
applications (only)

These steps in detail:

1. Modify dependencies of php-common

# download the package (php-common_2%3a92_all.deb)
cd /tmp
apt download php-common
# Unpack the package (this will create three files: debian-binary
control.tar.xz data.tar.xz)
mkdir deb && cd deb/
ar x ../php-common_2%3a92_all.deb
# Unpack control archive
mkdir control && cd control/
tar xf ../control.tar.xz
# Fix dependencies in control using a text editor (I used vim):
# - remove "php7.4-common" from the "Break: " statement
# - also append "-compat" after the version to prevent this package from
being overwritten with the original one
vim control
# Repack control.tar.gz
tar c * | xz -c > ../control.tar.xz
cd ..
rm -rf -- control/
# Repack deb (order important!)
ar rcs ../php-common_2%3a92_all-compat.deb debian-binary control.tar.xz
data.tar.xz
cd ..
# clean up
rm -rf -- deb/
# install package
dpkg -i php-common_2%3a92_all-compat.deb


2. Install PHP 7.4

# install PHP 7.4 packages as well as mod_fcgi (FastCGI) for Apache
apt-get install libapache2-mod-fcgid php7.4 php7.4-fpm <add further
php7.4-* packages required by your web applications>

# enable Apache2 modules
a2enmod actions fcgid alias proxy_fcgi

# note: I was already using mpm_event; but if you are using the mod_php
(prefork MPM) module with Apache, then you also need to do the following:
a2dismod php8.1 mpm_prefork
a2enmod mpm_event proxy_fcgi setenvif
a2enconf php8.1-fpm
systemctl restart apache2


3. Configure Apache to use PHP 7.4 for specific web applications (In my
case: horde and phpLDAPadmin):

I edited my site configuration (file under /etc/apache2/sites-enabled/)
and added:

    <Directory ~ "^/usr/share/(horde|phpldapadmin)/">
                <FilesMatch \.php$>
                        SetHandler
"proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
                </FilesMatch>
        </Directory>

Cheers,

Timo
0 new messages