How to update PHP NC 19.0.0?

Sorry you did say that. Will give it a try.

I forgot you said you were using the finely crafted VM. When you installed php7.4, they placed “default” configuration files in that folder. However, these defaults differ (sometimes significantly) from what is sensible for running Nextcloud. As @eehmke suggested - simply check what’s there in 7.2 and set the same values in 7.4

@eehmke,

In /etc/php/7.2/fpm/pool.d/ are three files:
nextcloud.conf
www.conf
www.conf.backup

I assume .backup is not important but do i have to copy and edit both files? you said “A FILE”, so i assumed you expected one file…

Should be nextcloud.conf, obviously. Don’t forget to edit the content after copying.

There is no /etc/php7.4/fpm/pool.d directory. I assume i just have to create the /fpm/pool.d directories? Or should they be there and could there be a problem?

It’s part of the php7.4-fpm package. You have to install it. Make sure for every php7.2 package installed, you need to install the corresponding php7.4 package.

I have done what i have said in my opening:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.4

So this is not enough? I have to install additional packages?

@eehmke, my mistake there is a php/7.4 directory. within
apach2
cli
mods-available

Should i then just create the fpm/pool.d directory?

do you have php7.4-fpm installed?

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.4

I did the above, i assume that doesn’t include php7.4-fpm than? How do i check if i have php7.4-fpm installed?

Just sudo apt-get install -y php7.4 does not install the fpm package, because it is not basic. You must install it separately. That’s why I said to check all php7.2 packages.

Do this:

dpkg -l | grep php7.2

for each 7.2 package listed, install the matching 7.4 package by

sudo apt install php7.4xxx

After the php7.4-fpm package has been installed, the pool directory will be present.

@eehmke, you are right (again :stuck_out_tongue: )
When i compare dpkg -l | grep php7.2 with dpkg -l | grep php7.4 this is the result:

hi php7.2-bz2 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 bzip2 module for PHP
hi php7.2-cli 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
hi php7.2-common 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for P HP
hi php7.2-curl 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 CURL module for PHP
hi php7.2-dev 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 Files for PHP7.2 module development
hi php7.2-fpm 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language ( FPM-CGI binary)
hi php7.2-gd 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 GD module for PHP
hi php7.2-gmp 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 GMP module for PHP
hi php7.2-imap 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 IMAP module for PHP
hi php7.2-intl 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 Internationalisation module for PHP
hi php7.2-json 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
hi php7.2-ldap 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 LDAP module for PHP
hi php7.2-mbstring 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 MBSTRING module for PHP
hi php7.2-opcache 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
hi php7.2-pgsql 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 PostgreSQL module for PHP
hi php7.2-readline 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP
hi php7.2-soap 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 SOAP module for PHP
hi php7.2-xml 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for P HP
hi php7.2-zip 7.2.31-1+ubuntu18.04.1+deb.sury.org+1 amd64 Zip module for PHP

ii libapache2-mod-php7.4 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
hi php7.4 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 all server-side, HTML-embedded scripting language (metapackage)
hi php7.4-cli 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
hi php7.4-common 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 documentation, examples and common module for PHP
hi php7.4-json 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 JSON module for PHP
hi php7.4-opcache 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 Zend OpCache module for PHP
hi php7.4-readline 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 amd64 readline module for PHP

So you are right, i am missing a couple of php7.4 packages compared to php7.2.

But when i try sudo apt install php7.4-bz2:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package php7.4-bz2
E: Couldn’t find any package by glob ‘php7.4-bz2’
E: Couldn’t find any package by regex ‘php7.4-bz2’

And when i try sudo apt install php7.4-fpm:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package php7.4-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

And when i do sudo apt-cache search php7.4:

php7.4-common - documentation, examples and common module for PHP
libapache2-mod-php7.4 - server-side, HTML-embedded scripting language (Apache 2 module)
php7.4-opcache - Zend OpCache module for PHP
php7.4-cli - command-line interpreter for the PHP scripting language
php7.4 - server-side, HTML-embedded scripting language (metapackage)
php-smbclient - PHP wrapper for libsmbclient
php7.4-readline - readline module for PHP
php7.4-json - JSON module for PHP

So it seems i have to install php7.4-fmp and the other packages (except the ones stated right above) in a different way?

Can’t believe there is no php7.4-fpm package. Do this:

sudo apt update
sudo apt-cache search php7.4 | grep fpm

Even if it has been renamed (which I do not believe) the package should show up.

I read not all in this thread. But you use Ubuntu 18.04 LTS and you must change in the future to Ubuntu 20.04 LTS. With the new Ubuntu-version you also get a new PHP-version.

@devnull, thanks for the heads up. And how do you suggest i do that? Is there a way to “upgrade”?

You use Ubuntu.

You use Ubuntu with LTS release. That is quite fine.
Canonical releases every two years a new LTS release.
The new LTS release is from April 2020 named Ubuntu 20.04 LTS.

If you dist-upgrade you Ubuntu-installation you get new versions from e.g. Apache2, PHP, MariaDB, …

See PHP-versions in Ubuntu:
packages.ubuntu.com/php

bionic (18.04LTS) (php): server-side, HTML-embedded scripting language (default)
1:7.2+60ubuntu1: all 
groovy (php): server-side, HTML-embedded scripting language (default)
2:7.4+76: all 

For dist-upgrade you must backp all stuff and able to restore all if dist-upgrade fails.
Alternative you can install Ubuntu 20.04 LTS to a new system and then migrate your applications like Nextcloud from the old system (Ubuntu 18.04 LTS) to the new system (Ubuntu 20.04 LTS).

The last possibility is to wait. You can wait till Nextcloud 20 and then you need a newer PHP-version. And yes perhaps you can install a newer PHP-version Ubuntu 18.04. LTS. It is a little like Windows XP with extrem new software and a exrem old operation system. On linux systems normally alternative sources or packages from other releases (edit sources.list) is not needed.

@eehmke,
After

sudo apt update
sudo apt-cache search php7.4 | grep fpm

The update shows me a couple of urls and after the second command, the system shows me:

Php7.4-fpm - server-side, HTML embedded scripting language (FPM-CGI binary)

And the -fpm , the fpm letters are in the color red.

It’s red because you grepped for it.

Now you will be able to install it, and the other missing packages.

If you dist-upgrade to Ubuntu 20.04 LTS later please deinstall this packages who do not belong to Ubuntu 18.04 LTS and not to Ubuntu 20.04 LTS. Make a notice for future. You can install “apt-show-versions” and search the packages:
apt-show-versions |fgrep -v bionic

@eehmke,

i forgot to mention that sudo apt update tells me:

13 packages can be upgraded. Run ‘apt list --upgradable’ to see them.

When i try to install php7.4-frm after i used your grep command:

sudo apt install php7.4-fpm
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php7.4-fpm : Depends: php7.4-common (= 7.4.7-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.

If i try to install php7.4-common:

sudo apt install php7.4-common
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php7.4-cli : Depends: php7.4-common (= 7.4.6-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.7-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
php7.4-json : Depends: php7.4-common (= 7.4.6-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.7-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
php7.4-opcache : Depends: php7.4-common (= 7.4.6-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.7-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
php7.4-readline : Depends: php7.4-common (= 7.4.6-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.7-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

when i try to install php7.4:

sudo apt install php7.4-cli
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php7.4-cli : Depends: php7.4-common (= 7.4.7-1+ubuntu18.04.1+deb.sury.org+1) but 7.4.6-1+ubuntu18.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@cloud:/home/ncadmin# sudo apt install php7.4
Reading package lists… Done
Building dependency tree
Reading state information… Done
php7.4 is already the newest version (7.4.7-1+ubuntu18.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.