After upgrading to PHP 8.1 from 7.3 nextcloud is non responsive

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:

example

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

longer
example
here

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 (eg, 23.0.3): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): 2.4.38
PHP version (eg, 7.4): 8.1

The issue you are facing:
after upgrading to 8.1 i cannot access nextcloud, browser downloads the file upon visit.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

[Sun Apr 03 00:00:07.716538 2022] [mpm_prefork:notice] [pid 1002] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1n configured -- resuming normal operations
[Sun Apr 03 00:00:07.716568 2022] [core:notice] [pid 1002] AH00094: Command line: '/usr/sbin/apache2'
[Sun Apr 03 00:00:10.294388 2022] [mpm_prefork:notice] [pid 1002] AH00171: Graceful restart requested, doing restart
[Sun Apr 03 00:00:10.366963 2022] [mpm_prefork:notice] [pid 1002] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1n configured -- resuming normal operations
[Sun Apr 03 00:00:10.366980 2022] [core:notice] [pid 1002] AH00094: Command line: '/usr/sbin/apache2'
[Sun Apr 03 00:45:45.858371 2022] [mpm_prefork:notice] [pid 1002] AH00169: caught SIGTERM, shutting down
[Sun Apr 03 00:45:46.965924 2022] [suexec:notice] [pid 16569] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Apr 03 00:45:46.998223 2022] [mpm_prefork:notice] [pid 16570] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1n configured -- resuming normal operations
[Sun Apr 03 00:45:46.998245 2022] [core:notice] [pid 16570] AH00094: Command line: '/usr/sbin/apache2'
[Sun Apr 03 01:03:19.605372 2022] [mpm_prefork:notice] [pid 16570] AH00171: Graceful restart requested, doing restart

23.0.3 doesn’t support 8.1.

I tried 7.4, still same, heres how it happened, i changed hp version on cpanel then checked if nextcloud works, it didnt then i switched back to 7.3 and still nothing

i get that, problem is site is stuck in a limbo now, can you help?

You’re asking me to help you with something while providing no error logs or anything to go off of.

No. I can’t help you.

Try searching for how to restore a previous version of php. Or search for your exact error wording

  • on the forum
  • via internet search
  • on nextcloud server github issues
  • nextcloud admin documentation

Honestly, these are the same places we all check since these issues crop up over the years. There must be many examples to be found. You can also check nextcloud.log under /var/www or as admin user on top right menu for specific errors which you can copy-paste or pastebin.

Nice F way to ask for help.

Anyway, it seem you don’t even know how to read a log. This is not nextcloud in fault, but your apache mpm…

Please, don’t come back.

Thanks bud, i sorted it out, much appreciated.

Please add the solution here. Then we can close this out and keep it useful for anyone searching this out in the future. Thanks.

The highest version of PHP that can be used for Nextcloud 23 is PHP 8.0

From own experience I recomend the following:
Up to Nextcloud 21: not above PHP 7.3
Nextcloud 22: PHP 7.4 or 8.0
on upgrade, if you fail on step 5 (file verification) make sure your PHP memory limit ist above 256M, ideally: 512M
you can set this in the php.ini

there is tweaks to use php8.1 in conjunction with nc23 , but it is out of the scope, and not to be use in production server…

Yeah, I am aware, that is why I didn’t suggest it.
I would suggest two PHP versions in parallel if you really need PHP8.1