Sounds about right. Go for PHP 7.4, it works great with Nextcloud.
“About right” or totally right?
I don’t wanna break my Nextcloud
(Yes of course i have a backup)
You won’t break your Nextcloud. You can easily install PHP 7.4 beside 7.2. If anything does not work, you can switch back to 7.2. I have 4 instances of Nextcloud running on 7.4 now for some months, no problem.
Since we/me are here to learn How do i switch back?
You should have a reference to php7.2 in your vhost configuration. That’s how it works with Apache, I don’t know nginx, but should be similar. Just change that.
Have a look here (below). Can replace 7.3 with 7.4…
As long as you run Apache and MariaDB/MySQL it should work even on non-RasPI…
I run the Hansson VM (on an ESX server) by the way, this one:
I have tried the commands in my startpost, and Nextcloud is still telling me:
Je draait momenteel PHP 7.2.24-0ubuntu0.18.04.6. We adviseren je om, zo gauw je distributie dat biedt, je PHP versie bij te werken voor betere prestaties en beveiliging geleverd door de PHP Group.
Let’s start from scratch. I assume you have command line access. What is the output of this commands:
sudo dpkg -l | grep php
Do you have apache or nginx installed? If apache, what is the content of directory
sudo dpkg -l | grep php shows me:
a couple of lines with php7.2… and php7.4…
php -v shows me:
the apache2/sites-available directory holds:
So PHP 7.4 is installed. What is the content of
There should be a symlink to one of the files in sites-available. Show us the content of that file.
So not the same as sites/availabe…
my nextcloud url is cloud.DOMAIN.nl btw.
Is cloud.DOMAIN.nl.conf an actual file or a symlink? It should be a symlink to sites-available. Anyway please post the content of that file. Remove/replace domain information.
when i enter vi cloud.DOMAIN.nl.conf it shows:
Redirect / https://cloud.DOMAIN.nl
Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains" SSLEngine on SSLCompression off SSLProtocol all -TLSv1 -TLSv1.1 -SSLv2 -SSLv3 SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHEv-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder on
YOUR SERVER ADDRESS
ServerAdmin admin@cloud.DOMAIN.nl ServerName cloud.DOMAIN.nl
<FilesMatch "\.php$"> SetHandler "proxy:unix:/run/php/php7.2-fpm.nextcloud.sock|fcgi://localhost" </FilesMatch> DocumentRoot /var/www/nextcloud <Directory /var/www/nextcloud> Options Indexes FollowSymLinks AllowOverride All Require all granted Satisfy Any </Directory> <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. <Files ".ht*"> Require all denied </Files> # Disable HTTP TRACE method. TraceEnable off # Disable HTTP TRACK method.
So you have a handler for php.7.2-fpm:
So you have to set this up for php7.4, restart the fpm handler, change the line in your cloud.DOMAIN.nl.conf and restart apache.
Tell us if you need help with these steps. They are quite straightforward.
I have changed the 7.2 into an 7.4 (and rebooted) but now when i try to open my cloud the error is:
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
(i have edited the file in /etc/apache2/sites-enabled)
This could mean a number of things, but in the end all point to PHP not working properly:
- is php7.4-fpm running?
- are all necessary php7.4 packages installed? The database module might be missing (e.g. php7.4-mysql)
Also, (it’s a bit annoying in Debian-based systems) you have to manually port the changes you made to the php7.2 configuration files (in
/etc/php/7.2/fpm/... to the 7.4 directory. This e.g. concerns upload size and memory limits.
I wish i hadn’t have to ask…but how do i check if php fpm is running? And how do i check if all necessary packages are installed?
I don’t understand what you mean by port changes, what do i need to do? (Exactly )
I told you to set up the fpm handler for 7.4 .
There should be a file in
that refers to your fpm config. Copy it to
and edit it, replace all occurences of 7.2 to 7.4.
sudo systemctl restart php7.4-fpm.service
now restart apache. You don’t have to reboot, this is not windows.
Sorry you did say that. Will give it a try.