Update php version for snap version of nextcloud

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (snap 20.0.2):
Operating system and version (Ubuntu 16.04 LTS):
Apache or nginx version (snap):
PHP version (7.0):

The issue you are facing:
My nextcloud doesn’t send email notification for useres since end of october. I found out the php version must be one of the issue, becuse I am uanble to run cron.php from cli, because of the old version of php.
There are many topics about the php update on this system, but those are not for snap versions. After I have updated php version on the system, what to do with the nextcloud (snap)?
How to point to the new php for the nextcloud.apache?

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

The short version is: you can’t. The snap version of Nextcloud comes pre-packages with all of its components, and you can’t really modify it.

However, are you sure your problem is the PHP version? What error are you getting when you send a test email from Nextcloud?

Thank you for your quick answer. The test e-mail and the email alerts are working fine, except the scheduld file sharing notification mail (hourly when it was some activity), wich is stop working since october. I was guessing it cause by the php version, because if I run the cron.php in the browser this is the message:
{“data”:{“message”:“Backgroundjobs are using system cron!”},“status”:“error”}
The top of it I am unable to run the cron.php manualy, because it’s ask for php 7.2 and corrently I am using 7.0 (which comes with Ubuntu 16.04 LTS)

Unless I’m mistaken, the snap version comes with its own PHP version, just as it comes with its own Apache, etc. It’s probably already running a newer version than what Ubuntu 16.04 provides.

Also, do you have Nextcloud configured to use cron or web cron?

Nextcloud configured to cron, and I have not changed that for years.
Anyway thank you for your time, it helped me to find out what happend with the nextcloud update in october. I have reconfigured the users notifications from the user control panel and the system started to send the email again, so problem solved.
Thank you again!

There is a minor problem with the emails. I was reconfigured 3 users account for notifications, but only one user gets the emails properly the others have not got anything. It’s strange. At the moment the log level is on 2 and I can’t see any error relating to this issue. Any idea?