Apache-less variant - PHP-FPM Upgrade from PHP 7.3 to PHP 8.1

Post Reply
XAOC
Posts: 6
Joined: Tue Aug 25, 2020 7:32 am

I partially succeeded to install PHP 8.1 on a test server. Now I have php-pool errors when I try to add a new domain

Code: Select all

Clean install Debian 10

sudo apt update
sudo apt upgrade

curl -O http://c.myvestacp.com/vst-install-debian.sh

sudo bash vst-install-debian.sh --apache no --nginx yes --phpfpm yes --vsftpd no --proftpd yes --named no --mysql yes --mysql8 no --postgresql no --exim yes --dovecot yes --clamav no --spamassassin yes --iptables yes --fail2ban yes --quota no --force no --interactive yes --port 8083 --lang en

sudo apt-get purge php7.*

sudo apt -y install lsb-release apt-transport-https ca-certificates wget

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

sudo apt update

sudo apt install php8.1-fpm

sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-redis php8.1-intl -y

sudo service php8.1-fpm restart
Image

Vesta error.log

Code: Select all

2023-01-03 20:37:17 v-change-web-domain-proxy-tpl  'admin' 'domain.com' 'hosting-webmail-phpmyadmin' 'jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,woff,woff2' 'no' [Error 11]
2023-01-03 20:38:01 v-add-letsencrypt-domain  'admin' 'domain.com' '' 'yes' [Error 15]
2023-01-03 20:53:12 v-list-dns-domain  'admin' 'domain.com' 'json' [Error 3]
2023-01-03 20:53:13 v-list-dns-domain  'admin' 'www.domain.com' 'json' [Error 3]
2023-01-03 20:54:55 v-change-web-domain-tpl  'admin' 'domain.com' 'codeigniter3' 'no' [Error 3]
2023-01-03 20:56:17 v-change-web-domain-tpl  'admin' 'domain.com' 'codeigniter3' 'no' [Error 3]
2023-01-03 20:56:48 v-change-web-domain-tpl  'admin' 'domain.com' 'wordpress2_rewrite' 'no' [Error 3]
2023-01-03 21:05:15 v-change-web-domain-tpl  'admin' 'domain.com' 'codeigniter3' 'no' [Error 3]
2023-01-03 21:06:02 v-delete-web-domain-backend  'admin' 'domain.com' 'no' [Error 3]
2023-01-03 21:06:09 v-add-web-domain-backend  'admin' 'domain.com' 'default' [Error 3]
2023-01-03 21:06:09 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 3]
2023-01-03 21:06:23 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 10]
2023-01-03 21:07:19 v-add-web-domain-backend  'admin' 'domain.com' 'default' [Error 3]
2023-01-03 21:07:19 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 3]
2023-01-03 21:12:32 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 10]
2023-01-03 21:13:19 v-add-web-domain-backend  'admin' 'domain.com' 'default' [Error 3]
2023-01-03 21:13:19 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 3]
2023-01-03 23:30:55 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 10]
2023-01-03 23:31:17 v-add-web-domain-backend  'admin' 'domain.com' 'default' [Error 3]
2023-01-03 23:31:17 v-add-web-domain  'admin' 'domain.com' '111.111.111.111' 'no' 'www.domain.com' '' [Error 3]
Does anyone know how to safely upgrade from php 7.3 to php 8.1 on nginx/php-fpm server?

Tags:
User avatar
myVesta
Site Admin
Posts: 765
Joined: Fri Jun 19, 2020 9:59 am

instead of

Code: Select all

sudo apt-get purge php7.*
do the following:

Code: Select all

sudo update-alternatives --set php /usr/bin/php7.3
sudo mv /etc/php/7.3 /root/7.3
sudo mv /etc/php/7.4 /root/7.4
sudo mv /etc/php/8.2 /root/8.2
sudo apt update
sudo apt remove --purge php7.3-fpm
sudo apt remove --purge php7.4-fpm
sudo apt remove --purge php8.2-fpm
the point is - delete all other php-fpm services - and move it out from /etc/php/ folder.
leave only 8.1 if you already installed it.

if not, then you can install it by doing the rest of code that you pasted in your first post:

Code: Select all

sudo apt -y install lsb-release apt-transport-https ca-certificates wget

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

sudo apt update

sudo apt install php8.1-fpm

sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-redis php8.1-intl -y

sudo service php8.1-fpm restart
XAOC
Posts: 6
Joined: Tue Aug 25, 2020 7:32 am

I did all you said on a clean install and I have issues

Code: Select all

Clean install Debian 10

sudo apt update
sudo apt upgrade

curl -O http://c.myvestacp.com/vst-install-debian.sh

sudo bash vst-install-debian.sh --apache no --nginx yes --phpfpm yes --vsftpd no --proftpd yes --named no --mysql yes --mysql8 no --postgresql no --exim yes --dovecot yes --clamav no --spamassassin yes --iptables yes --fail2ban yes --quota no --force no --interactive yes --port 8083 --lang en

sudo update-alternatives --set php /usr/bin/php7.3
sudo mv /etc/php/7.3 /root/7.3
sudo mv /etc/php/7.4 /root/7.4
sudo mv /etc/php/8.2 /root/8.2
sudo apt update
sudo apt remove --purge php7.3-fpm
sudo apt remove --purge php7.4-fpm
sudo apt remove --purge php8.2-fpm

sudo apt -y install lsb-release apt-transport-https ca-certificates wget

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

sudo apt update

sudo apt install php8.1-fpm

sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-redis php8.1-intl -y

sudo service php8.1-fpm restart
php -v shows 7.3

Image

PHPMyAdmin and Roundcube throw ERROR 500

Code: Select all

[error] 499#499: *7 connect() failed (111: Connection refused) while connecting to upstream
Post Reply