NC21 beta and PHP8


I am trying to get NC21 beta working with Mageia 8 beta.
Mageia 8 ships PHP8 out of the box.
I get NC21 beta (beta3 to beta5) to work with a Nginx / php-fpm v8 server and PostregSQL database.
However, if I try with a MariaDB database instead, I can reach the installation wizard but I get the following error message when I click on the button to complete the installation : “Error while trying to initialise the database: There is no active transaction”

Has it been noticed / reported by someone already ?

Thanks for your insights!

Thanks for testing Nextcloud 21 :+1:

Check this patch: Don't try a transaction for the migrator on MySQL by nickvergessen · Pull Request #25038 · nextcloud/server · GitHub

Thanks @kesselb for your prompt feedback.

Is it the correct understanding from your link a fix has been tested and should be released soon ? beta 6 ?

Is there any kind of NC21/PHP8 test I can help you with ?

In case you want to build a CI/CD pipeline for testing:

tell your gitlab runner/jenkins/whatsoever to run my playbook in a vserver:

./nextcloud.yml -e nextcloud_archive=https:// -e php_version='8.0' nextcloud_db_type='pgsql'
./nextcloud.yml -e nextcloud_archive=https:// -e php_version='8.0' nextcloud_db_type='mysql'

if you want to automate “create and delete” of the vserver see here:


hetzner is just an example. cloud-init is support by nearly any cloud hoster. (the good ones. :wink: )

I have an overview ticket at php8 compatibility · Issue #564 · nextcloud/3rdparty · GitHub with all the dependencies that still need a bump. I hope to finish this list the next few days. Our CI is running php8 tests already, but as always there are portions of our code that are not covered. If you find anything, like the transaction issue that we fixed in the meantime, please do not hesitate to report them in the server repo and even even mention me.

Right now the dependencies have priority because they are more painful to update once Nextcloud 21.0.0 is out. Any changes in our code are far easier to backport.

1 Like

Hi @ChristophWurst @Reiner_Nippes and @kesselb

I have been testing the several NC21 beta releases on both Mageia 7 (php 7.3.26) and Mageia 8 (php 8.0.1).
The installation wizard step is passed now since beta6 with both PostgreSQL and MariaDB.

However, with NC21 betas, both PHP 7.3 and PHP8, I keep getting the following warnings on the Overview section of the admin page:

Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation.
Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation.
Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.
Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation. 

I use exactly the same NGINX configuration files between NC20 and NC21. I don’t get these warnings with NC20.

Has anything changed in that matter with NC21?

edit: I am now on beta7

If you want me to open another post for that, just let me know.

Good catch, @squid-f. That changed indeed and the docs should reflect this: General troubleshooting — Nextcloud latest Administration Manual latest documentation

This has nothing to do with the php version btw. Nextcloud 21 just has built-in well-known handling, hence some of the old manual redirects are obsolete and should be dropped from the webserver config. With Apache that happens automatically through the htaccess, for nginx you need to adjust the configuration according to the docs.

Thanks @ChristophWurst for your prompt rely.

When will it be reflected on the documentation ? I opened your link but, to me, it is still the NC20 instruction, isn’t it ?

It was updated six weeks ago: Update admin webserver config recommendations for well known handlers by ChristophWurst · Pull Request #5825 · nextcloud/documentation · GitHub

The link I sent earlier is to the latest docs, it should point to the Nextcloud 21 docs.

Hi @ChristophWurst @Reiner_Nippes and @kesselb

Something has happened : I am not able anymore to get NC21 running with PHP8.
Might be connected to PHP8 update or something NC21 doesn’t like with it.
I need some support to troubleshoot and to post it at a better place, if relevant.

I run NC21beta7, NGINX server with PHP-FPM.
It works with PHP7.4. I have exactly the same PHP parameters and nginx conf files in the 2 VM; one running with PHP7.4 and the other with PHP8.0.1

It doesn’t work in the VM with PHP8.0.1
PostgreSQL or MariaDB lead to the same error.

I mean by that:

  • I get the installation wizard
  • I am able to create the admin user and to enter the database credentials.
  • When I click on Finish setup, the wheel spins a little and I get an internal server error; “the server was unable to complete your request”.

There is no nextcloud.log file created at that stage.

#ls -al /data/ncdata
total 12
drwxr-xr-x 3 apache apache 4096 janv. 28 10:25 .
drwxr-xr-x 3 root   root   4096 janv. 28 09:44 ..
drwxr-xr-x 2 apache apache 4096 janv. 28 10:25 appdata_ocoha23umtve

The only log info I have been able to locate so far are the one in /var/log/nginx/error.log:

# tail /var/log/nginx/error.log
2021/01/28 10:24:07 [error] 1269#1269: *2 FastCGI sent in stderr: "PHP message: {"reqId":"WzDNqxBLH706baE3w1l8","level":3,"time":"2021-01-28T09:24:07+00:00","remoteAddr":"::1","user":"--","app":"PHP","method":"GET","url":"/nextcloud/","message":{"Exception":"Error","Message":"session_start(): Ignoring session_start() because a session is already active at /var/www/nextcloud/lib/private/Session/Internal.php#207","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8,"session_start(): Ignoring session_start() because a session is already active","/var/www/nextcloud/lib/private/Session/Internal.php",207]},{"function":"session_start","args":[{"cookie_samesite":"Lax"}]},{"file":"/var/www/nextcloud/lib/private/Session/Internal.php","line":207,"function":"call_user_func_array","args":["session_start",[{"cookie_samesite":"Lax"}]]},{"file":"/var/www/nextcloud/lib/private/Session/Internal.php","line":217,"function":"invoke","class":"OC\\Session\\Internal","type":"->","args":["session_start",[{"cookie_samesite":"Lax"}],true]},{"file":"" while reading response header from upstream, client: ::1, server: localhost, request: "GET /nextcloud/ HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php-fpm/php-fpm.sock:", host: "localhost"

It looks like there is a conflict created between already active sessions.
I have redone a fresh install in a new VM and I confirm the behavior.
I have also tried with NC21 beta6 and I get the same error.

As NC21beta7 works with the same configuration in another VM using PHP7.4, as I can reach the installation wizard, I think it is not related to my nginx configuration but more related to php8.
Actually, in a previous VM (unfortunately deleted…) with PHP8 and not PHP8.0.1., with the same nginx conf file, with NC21 beta5 (maybe beta6), I have been able to pass the installation wizard and apps installation steps.
So, I lean more towards something connected to PHP8.0.1

Have you noticed that already? Any hints on how to keep troubleshooting that?


@squid-f again this is the developer section of the forum to discuss any technical details about the new PHP release.

Use ℹ️ Support - Nextcloud community for support.


As it is related to NC21 and PHP8 development, I thought it would be the best place to post it, as it has been the way so far.
That being said, no issue to move it. I do it right away.

Thanks for your support.

1 Like