I am running Hestia 1.9.6 on a Debian 11.9 VPS. I have some websites that I am trying to update from PHP 8.1 to PHP 8.2. I went to a website account and clicked the Edit Pencil. Then I clicked Advanced Options and changed the backend template from PHP 8.1 to PHP 8.2. Unfortunately, after clicking save, the website displayed a 500 error. I therefore changed it back to PHP 8.1 to display the website again.
I read that the problem was likely due to a broken PHP 8.2 install. I therefore made sure that no other website on the server was using PHP 8.2. I then opened a terminal and attempted to delete PHP 8.2 with this command as root:
v-delete-web-php 8.2
The terminal replied with "Uninstallation failed, please run the following command manually for debugging:
ii php7.4-fpm 1:7.4.33-8+0~20230904.88+debian11~1.gbp87c414 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php8.1-fpm 8.1.21-1+0~20230716.45+debian11~1.gbpbeb527 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php8.2-fpm 8.2.31-1~deb12u1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
Access your web site to generate again the 500 error and check the nginx and apache log:
tail -n30 /var/log/nginx/error.log
2026/06/18 22:38:12 [warn] 839153#839153: "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/bfa02/conf/mail/freedica.org/ssl/freedica.org.pem"
tail -n30 /var/log/apache2/error.log
[Fri Jun 19 04:32:03.924626 2026] [proxy_fcgi:error] [pid 995132:tid 140428737222336] [client 20.151.2.122:0] AH01071: Got error 'Primary script unknown'
[Fri Jun 19 05:35:16.705381 2026] [proxy_fcgi:error] [pid 1002470:tid 140429634750144] [client 104.219.236.111:0] AH01071: Got error 'Primary script unknown'
[Fri Jun 19 05:40:43.256447 2026] [mpm_event:notice] [pid 991454:tid 140429885888384] AH00493: SIGUSR1 received. Doing graceful restart
[Fri Jun 19 05:40:43.646591 2026] [ssl:warn] [pid 991454:tid 140429885888384] AH01909: 66.209.180.237:443:0 server certificate does NOT include an ID which matches the server name
[Fri Jun 19 05:40:43.648482 2026] [mpm_event:notice] [pid 991454:tid 140429885888384] AH00489: Apache/2.4.57 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1w configured -- resuming normal operations
[Fri Jun 19 05:40:43.648525 2026] [core:notice] [pid 991454:tid 140429885888384] AH00094: Command line: '/usr/sbin/apache2'
[Fri Jun 19 05:40:45.154012 2026] [mpm_event:notice] [pid 991454:tid 140429885888384] AH00493: SIGUSR1 received. Doing graceful restart
[Fri Jun 19 05:40:45.964988 2026] [ssl:warn] [pid 991454:tid 140429885888384] AH01909: 66.209.180.237:443:0 server certificate does NOT include an ID which matches the server name
[Fri Jun 19 05:40:45.967853 2026] [mpm_event:notice] [pid 991454:tid 140429885888384] AH00489: Apache/2.4.57 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1w configured -- resuming normal operations
[Fri Jun 19 05:40:45.967924 2026] [core:notice] [pid 991454:tid 140429885888384] AH00094: Command line: '/usr/sbin/apache2'
apt show php8.2-fpm -a
Package: php8.2-fpm
Version: 8.2.31-1~deb12u1
Priority: optional
Section: php
Source: php8.2
Maintainer: Debian PHP Maintainers <[email protected]>
Installed-Size: 5752 kB
Provides: php-fpm, php-json, php8.2-json, phpapi-20220829
Depends: libmagic1, media-types | mime-support, php8.2-cli, php8.2-common (= 8.2.31-1~deb12u1), php8.2-opcache, procps, systemd | systemd-tmpfiles, tzdata, ucf, libacl1 (>= 2.2.23), libapparmor1 (>= 2.7.0~beta1+bzr1772), libargon2-1 (>= 0~20171227), libc6 (>= 2.35), libpcre2-8-0 (>= 10.32), libsodium23 (>= 1.0.18), libssl3 (>= 3.0.0), libsystemd0, libxml2 (>= 2.8.0), zlib1g (>= 1:1.1.4)
Suggests: php-pear
Homepage: http://www.php.net/
Download-Size: 1747 kB
APT-Manual-Installed: yes
APT-Sources:
bookworm/main amd64 Packages
Description: server-side, HTML-embedded scripting language (FPM-CGI binary)
This package provides the Fast Process Manager interpreter that runs
as a daemon and receives Fast/CGI requests. Note that MOST Apache users
probably want the libapache2-mod-php8.2 package.
The following extensions are built in: Core date filter hash json libxml
openssl pcre random Reflection session sodium SPL standard zlib.
.
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.
Package: php8.2-fpm
Version: 8.2.15-1+0~20240120.39+debian11~1.gbp56f296
Priority: optional
Section: php
Source: php8.2
Maintainer: Debian PHP Maintainers <[email protected]>
Installed-Size: 5727 kB
Provides: php-fpm, php-json, php8.2-json, phpapi-20220829
Depends: libmagic1, media-types | mime-support, php8.2-cli, php8.2-common (= 8.2.15-1+0~20240120.39+debian11~1.gbp56f296), php8.2-opcache, procps, systemd | systemd-tmpfiles, tzdata, ucf, libacl1 (>= 2.2.23), libapparmor1 (>= 2.7.0~beta1+bzr1772), libargon2-1 (>= 0~20171227), libc6 (>= 2.29), libpcre2-8-0 (>= 10.38), libsodium23 (>= 1.0.18), libssl1.1 (>= 1.1.1), libsystemd0, libxml2 (>= 2.8.0), zlib1g (>= 1:1.1.4)
Suggests: php-pear
Homepage: http://www.php.net/
Download-Size: 1720 kB
APT-Sources: https://packages.sury.org/php bullseye/main amd64 Packages
Description: server-side, HTML-embedded scripting language (FPM-CGI binary)
This package provides the Fast Process Manager interpreter that runs
as a daemon and receives Fast/CGI requests. Note that MOST Apache users
probably want the libapache2-mod-php8.2 package.
.
The following extensions are built in: Core date filter hash json libxml
openssl pcre random Reflection session sodium SPL standard zlib.
.
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.
cat /etc/apt/sources.list.d/php.list
deb [arch=amd64 signed-by=/usr/share/keyrings/sury-keyring.gpg]
bullseye main
cat /etc/apt/sources.list.d/apache2.list
deb [arch=amd64 signed-by=/usr/share/keyrings/apache2-keyring.gpg]
bullseye main
apt update
Hit:1
bookworm InRelease
Hit:2
bookworm-security InRelease
Hit:3
bookworm-updates InRelease
Hit:4
bookworm-backports InRelease
Get:5 https://packages.sury.org/apache2 bullseye InRelease [6070 B]
Hit:6 https://apt.hestiacp.com bullseye InRelease
Get:7 https://packages.sury.org/php bullseye InRelease [6136 B]
Get:8
bullseye InRelease [3296 B]
Err:5 https://packages.sury.org/apache2 bullseye InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
Err:7 https://packages.sury.org/php bullseye InRelease
The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
Err:8
bullseye InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
Hit:9
bullseye InRelease
Fetched 3296 B in 6s (524 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
567 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/apache2 bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error:
bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Failed to fetch https://packages.sury.org/apache2/dists/bullseye/InRelease The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: Failed to fetch https://nginx.org/packages/mainline/debian/dists/bullseye/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
I did the first five commands. But v-add-web-php 8.2 ended with “Installing PHP 8.2, please wait” but the install got hung up for some reason having to do with missing keys. So I went to sleep to see if it would ever complete. Sadly, the install never completed. It is now the next morning. Here was the install process:
Get:1 https://packages.sury.org/apache2 bullseye InRelease [6070 B]
Get:2 https://packages.sury.org/php bullseye InRelease [6136 B]
Hit:3 https://apt.hestiacp.com bullseye InRelease
Get:4
bullseye InRelease [3296 B]
Err:4
bullseye InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
Get:5 https://packages.sury.org/apache2 bullseye/main amd64 Packages [11.4 kB]
Hit:6
bullseye InRelease
Get:7 https://packages.sury.org/php bullseye/main amd64 Packages [288 kB]
Hit:8
bookworm InRelease
Hit:9
bookworm-security InRelease
Hit:10
bookworm-updates InRelease
Hit:11
bookworm-backports InRelease
Fetched 300 kB in 3s (96.1 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
603 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error:
bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Failed to fetch https://nginx.org/packages/mainline/debian/dists/bullseye/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@ns1:~# v-add-web-php 8.2
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error:
bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Failed to fetch https://nginx.org/packages/mainline/debian/dists/bullseye/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Some index files failed to download. They have been ignored, or old ones used instead.
Installing PHP-8.2, please wait...
The first command ended with a suggestion to upgrade 593 packages.
The second command came back with:
ERROR: Installation failed, please run the following command manually for debugging:
apt-get install php8.2-common php8.2-mbstring php8.2-bcmath php8.2-cli php8.2-curl
php8.2-fpm php8.2-gd php8.2-intl php8.2-mysql
php8.2-soap php8.2-xml php8.2-zip php8.2-bz2
php8.2-pspell php8.2-imagick php8.2-imap php8.2-ldap php8.2-apcu
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "en_US.UTF-8",
LC_NAME = "en_US.UTF-8",
LC_MONETARY = "en_US.UTF-8",
LC_PAPER = "en_US.UTF-8",
LC_IDENTIFICATION = "en_US.UTF-8",
LC_TELEPHONE = "en_US.UTF-8",
LC_MEASUREMENT = "en_US.UTF-8",
LC_TIME = "en_US.UTF-8",
LC_NUMERIC = "en_US.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "en_US.UTF-8",
LC_NAME = "en_US.UTF-8",
LC_MONETARY = "en_US.UTF-8",
LC_PAPER = "en_US.UTF-8",
LC_IDENTIFICATION = "en_US.UTF-8",
LC_TELEPHONE = "en_US.UTF-8",
LC_MEASUREMENT = "en_US.UTF-8",
LC_TIME = "en_US.UTF-8",
LC_NUMERIC = "en_US.UTF-8",
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
sed: can't read /etc/php/8.2/fpm/php.ini: No such file or directory
So I did the command that both you and the terminal suggested:
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1022802 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
-bash: php8.2-fpm: command not found
-bash: php8.2-soap: command not found
-bash: php8.2-pspell: command not found
What I mean by I kept the current versions, it was in response to this question:
dpkg --configure -a
php.ini: A new version (/usr/lib/php/8.2/php.ini-production.cli) of configuration file /etc/php/8.2/cli/php.ini is │
│ available, but the version installed currently has been locally modified. │
│ │
│ What do you want to do about modified configuration file php.ini? │
│ │
│ install the package maintainer’s version │
│ keep the local version currently installed
And it’s hanging again? If the answer is yes, is because dpkg is asking you a question but due the way Hestia installs the packages, you can’t see it.
The prior install did not hang. It just ended. So I did not have to do control C to end it. I did the four commands you suggested. Sadly, when I tried to install php 8.2, the reply was:
Installing PHP-8.2, please wait…
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_ADDRESS = “en_US.UTF-8”, LC_NAME = “en_US.UTF-8”, LC_MONETARY = “en_US.UTF-8”, LC_PAPER = “en_US.UTF-8”, LC_IDENTIFICATION = “en_US.UTF-8”, LC_TELEPHONE = “en_US.UTF-8”, LC_MEASUREMENT = “en_US.UTF-8”, LC_TIME = “en_US.UTF-8”, LC_NUMERIC = “en_US.UTF-8”, LANG = “C.UTF-8” are supported and installed on your system. perl: warning: Falling back to a fallback locale (“C.UTF-8”). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_ADDRESS = “en_US.UTF-8”, LC_NAME = “en_US.UTF-8”, LC_MONETARY = “en_US.UTF-8”, LC_PAPER = “en_US.UTF-8”, LC_IDENTIFICATION = “en_US.UTF-8”, LC_TELEPHONE = “en_US.UTF-8”, LC_MEASUREMENT = “en_US.UTF-8”, LC_TIME = “en_US.UTF-8”, LC_NUMERIC = “en_US.UTF-8”, LANG = “C.UTF-8” are supported and installed on your system. perl: warning: Falling back to a fallback locale (“C.UTF-8”).