Can't get the upgrade from php7.2 to php7.4 to work

Nextcloud version (eg, 18.0.2): 19.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04.3
Apache or nginx version (eg, Apache 2.4.25): 2.4.43
PHP version (eg, 7.1): currently still 7.2, want to go to 7.4

The issue you are facing:

I want to have my nextcloud install use php7.4 instead of 7.2. Have searched a lot in the forum as well as other php upgrade related sites, but am not getting it to work.

I have installed php7.4 including the modules which are currently in the php7.2 installation (there are 3 more modules in the 7.4 installation. I can’t install the wddx module for 7.4 as this does not seem to exist.

php7.2 -m php7.4 -m
[PHP Modules] [PHP Modules]
bcmath bcmath
bz2 bz2
calendar calendar
Core Core
ctype ctype
curl curl
date date
dom dom
exif exif
fileinfo fileinfo
filter filter
ftp ftp
gd gd
gettext gettext
gmp gmp
hash hash
iconv iconv
imap imap
intl intl
json json
ldap ldap
libsmbclient libsmbclient
libxml libxml
mbstring mbstring
openssl openssl
pcntl pcntl
pcre pcre
pdo_pgsql pdo_pgsql
pgsql pgsql
Phar Phar
posix posix
readline readline
Reflection Reflection
session session
shmop shmop
SimpleXML SimpleXML
smbclient smbclient
soap soap
sockets sockets
sodium sodium
standard standard
sysvmsg sysvmsg
sysvsem sysvsem
sysvshm sysvshm
tokenizer tokenizer
xml xml
xmlreader xmlreader
xmlwriter xmlwriter
xsl xsl
Zend OPcache Zend OPcache
zip zip
zlib zlib
[Zend Modules] [Zend Modules]
Zend OPcache Zend OPcache

I set the php version to php4 (alternative version).

php --version

I copied the file /etc/php/7.2/fpm/pool.d/nextcloud.conf to /etc/php/7.4/fpm/pool.d and modified the Handler.


The php7.4-fpm service is running (as well as the php7.2-fpm service).

To my knowledge, this should cover the php installation/configuration.

Onwards to Apache:

I disabled module php7.2 (a2dismod php7.2) and enabled php7.4-fpm (a2enconf php7.4-fpm).

In /etc/apache2/sites-enabled/nextcloud_ssl_domain_self_signed.conf I changed the line with the php version:

Afterwards restarted Apache. The only thing that I get is “Internal Server Error” and can’t find a logfile with a meaningful error message which might point me in a possible resolution.

Would appreciate a helpful hint a lot. I’m stuck :frowning:


You copied the nextcloud.conf to /etc/php/7.4/fpm/pool.d. Did you modify it after copying? There are references to the php version in it. You also have to restart the php7.4-fpm service.

I did modify nextcloud.conf (replaced 7.2 with 7.4) and restarted php7.4-fpm service aftwards.

1 Like

I think the better way is to upgrade from Ubuntu 18.04 LTS to 20.04 LTS . Then you get the new PHP version.

I think Nextcloud 19 is the last version you can use with the php version. You have a few months to dist-upgrade to Ubuntu 20.04 LTS or only change the php-version. You also can use Nextcloud 19 after release of 20 and 21.

1 Like