Upgrade PHP 7.2 -> 7.4

Nextcloud version (eg, 18.0.2): 20.0.2
Operating system and version (eg, Ubuntu 20.04):20.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.1):7.2.34

The issue you are facing:
I wantet to uograde my php version mentioned by the nextcloud interface from 7.2 to 7.4. I installed PHP 7.4 and did:

  • a2dismod php7.2
  • a2enmod php7.4

“php -v” also shows version 7.4.

But my nextcloud interface is still working on 7.2

What can i do?

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

  1. Install Php 7.4 with all modules
  2. Activate PHP 7.4

pls search the forum for more infos before posting.

in short: you might have changed the cli-version of php. but maybe not the web-version.
the forum knows how to check and what to do… :slight_smile:

pls post the solving answer here as a link to “solve” this thread as well.

Maybe, but how do i change this as well?
My search was not successfull.

Thanks a lot :frowning:

Under /etc/apache2/mods-enabled there are only php7.4.conf+load
Php7.2 is only under “mods-available”

Thanks

I also tried:

  • a2enmod php7.4-> already enbaled
  • a2enmod php7.4-fpm->already enabled
  • a2dismod php7.2 -> Modul does not exist
  • a2dismod php7.2 -> Modul does not exist

Where does nextcloud still find PHP 7.2 to run?
When i “purge” php7.2-fpm nextcloud does not work anymore.

What can i do, to force them to use php 7.4.?

Thanks

Edit: When i stop 7.2-fpm nextcloud brings “Service unavailable” and when i start, it works again.
So how can i link it to php7.4-fpm?

Thanks!

The following line can’t be changed:
SetHandel "proxy:unix:/run/php/php7.2-fpm

If i change it to 7.4-fpm nextcloud stops working

Can i check the php7.4-fpm or what can i try?

I tried to install php 7.3 like this:
Upgrading PHP to 7.3 - :information_source: Support - Nextcloud community

No Success.

Can anybody help me?

Anybody an idea?

Dear Thomas,
I run i similar problems. Nextcloud admin page says I’m using PHP 7.2.33-1+ubuntu18.04.1+deb.sury.org+1 but I have done a Ubuntu release upgrade from 18.04 to 20.04. In command line php -v shows 7.4 so it is installed and working on the system.

When I do a2enmod php7.4 I get
sudo a2enmod php7.2
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.

I then do sudo a2desmod php7.2 and restart apache2 using systemctl

After this opening the webpage ends in a servererror. Placing an php file into the nextcloud www root

<?php phpinfo(); ?>

and opening it in browser shows the 7.4. php version. So seem that php7.4 is working within apache but not wíth nextcloud.

So I switched back to 7.2 because I need nextcloud every day. I do not have any idea how to solve this. Its a shame. But I will go on testing different solutions.

Regards

Frank