Updating php - should I do it?


Nextcloud version (eg, 18.0.2): 19.0.3
Operating system and version (eg, Ubuntu 20.04): 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.1): 7.2.24

The issue you are facing:
I’ve got a warning in the settings overview page about my php version:

  • You are currently running PHP 7.2.24-0ubuntu0.18.04.6. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.
  • Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3.

I’ve searched here for instructions and found lots of horror stories. I’d assume that Ubuntu will eventually add the new version of php to an update. Do I need to update php now, or am I safe to wait?

Is this the first time you’ve seen this error? (Y/N): N

If you need professional support there’s an option for it:

And yes, runnig the latest (security) patches are always recommended. :slight_smile:

Normally, they don’t upgrade the major version unless you update your Ubuntu as well. NC19 is still supported for some time, and Ubuntu is still maintaining your current version. I’d do that at some point…

Other way are third-party packages, where you can use newer php versions in your current setup. You mix different sources, I think it can get more complicated, e.g. if you want to upgrade your system later.

If you are in virtual environment, you can already setup a new operating system, try to make Nextcloud work, once it is ok, you can delete the NC test setup and migrate your productive system.


Thanks Enoch. It’s a bit rich for me, as I’m only a hobbyist, but your advice is appreciated.

1 Like

With changing to Ubuntu 20.04 LTS you solve the problem.

1 Like

tflidd, thank you. I’ve been wondering about upgrading Ubuntu - I went with 18.04 because that was the recommended version in the Nextcloud installation instructions when I started out. Also, at the time, there was a fair amount of grumbling about 20.04 on various forums.
18.04 still has several years of support and php 7.2 is supported until 2022 (I’ve been obsessing!), so I don’t feel any urgency, but I think I will start researching the update process. php strikes me as profitable topic for a novice to learn more about. The bit that feels like the biggest barrier at the moment is backing up, particularly the database, but I’m sure it will prove amenable to study.
On the subject of learning, I’ve had a good week: I started it knowing nothing about cron and crontab and have sorted that security warning out, and now I’m diving into php. I’m going to be the belle of the ball at the next Linux Users Group Zoom meeting.
Thanks very much for your enlightening reply. It has really helped.

You need a backup the whole life circle … every new day.

It’s on my list of things to master, but daily? It looks like a lot of work for a daily routine. I’m a working stiff, as the Americans call us: there are days at a time when I don’t get the chance to turn on my own computer, let alone do admin stuff on my server. I assume there’s a way of automating it, but one thing at a time, I guess.
I back up my files once a week from my desktop, using the deja dup thingy that comes in Ubuntu and take copies of my calendars and contacts when I remember.
Thanks for the contribution, though. It’s usually me handing out the homework. It’s good to be reminded how it feels to be given it. :crazy_face: