PHP upgrade causes internal server error - related to webdav

Hi everyone,

I’ve just run into an error while trying to update to PHP 7.3, now I have no idea what could be wrong. It seems like I have some issue with WebDav (there are about 30 users using Nextcloud windows desktop client).

Everything important should be noted bellow. I really appreciate any help. Thank you very much :slight_smile:

Nextcloud version: 16.0.3
Operating system and version: Ubuntu 18.04.2 LTS
nginx version: nginx/1.14.0 (Ubuntu)
PHP version: 7.2 to be replaced with 7.3

  • PHP 7.2.24-0ubuntu0.18.04.1
  • PHP

The issue you are facing: I am facing an internal server error after changing my nginx nextcloud.conf config file. Only change I do is replacing outdated php-fpm socket like following:
#fastcgi_pass unix:/run/php/php7.2-fpm.sock; #old fastcgi_pass unix:/run/php/php7.3-fpm.sock; #new
Both files exists, I’ve checked that.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Change php7.2-fpm.sock to php7.3-fpm.sock file reference in nginx web config file.
  2. Run nginx -t - that says everything is fine.
  3. Restart nginx.
  4. Load nextcloud in web-browser.
  5. You will get following error:
Internal Server Error 
The server encountered an internal error and was unable to complete your request. 
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the server log. 

The output of your Nextcloud log in Admin > Logging:

{"reqId":"--reqID--","level":3,"time":"2019-12-07T12:24:05+00:00","remoteAddr":"--IPaddress--","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/--username--/","message":"Error: Class 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' not found at /usr/share/nginx/nextcloud/remote.php#57","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.0stable-Win64 (build 20190927) (Nextcloud)","version":"","id":"--id--"}

– That refers to this in /usr/share/nginx/nextcloud/remote.php:

if ($isXmlContentType === 0) {
                // fire up a simple server to properly process the exception
                $server = new Server();
                if (!($e instanceof RemoteException)) {
                        // we shall not log on RemoteException     //LINE 56
                        $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));     //LINE 57


The output of your nginx/system log in /var/log/nginx/error.log:

2019/12/07 13:24:05 [info] 9963#9963: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:63

– this refers to “php7.2-fpm.sock” to “php7.3-fpm.sock” change in nextcloud.conf config file.

I hope that I expressed clearly all important things, English is not my mother language so if you have any questions I’m happy to answer them.

Try to enable slowlog in php and see what gets logged (set it to 10 seconds). Something tells me it’s a Hasher function. Check this thread:

Thanks for your response but I have a stupid question I couldn’t google myself - how to enable showlog in php?

All I get in /var/log/php7.3-fpm.log is this:

[23-Dec-2019 00:07:46] NOTICE: error log file re-opened

And in php.ini file I already have
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

There might be also be a problem with php7.3 itself asi I get this warning while executing php7.3 in terminal:
PHP Warning: PHP Startup: Unable to load dynamic library '' (tried: /usr/lib/php/20180731/ (/usr/lib/php/20180731/ undefined symbol: igbinary_serialize), /usr/lib/php/20180731/ (/usr/lib/php/20180731/ cannot open shared object file: No such file or directory)) in Unknown on line 0
But I thing this is another problem which I should solve for php7.3.

Once again, thank you very much and I wish you a pleasant rest of Christmas.

There are ususally two PHP configurations impacted the PHP web component and the PHP cli component (command line interface). For both you have to make sure that the Redis cache is up-and-running.

For the PHP web component you can create e.g. a file name info.php, which contains the following code line: <?php phpinfo() ?>. If you open this file with your web browser, it should show detailed configuration information.
For the PHP cli component, you can run the command like this: php -r 'phpinfo();'.

Compare the pathes of the loaded modules to make sure you are using the right modules associated to the php version. There have been many similar reports in the past where users tried to upgrade the php version and ended in mixed-up module pathes etc.

The search function of this forum is very useful when analysing this kind of problems :wink:

After all, I’ve fixed this issue by upgrading php7.3 to newer version recently, rebooting the server and then it started working.

Anyway j-ed, thanks for your advice. :slight_smile: